Most Essential Features of the laravel 5.8
Laravel version 5.8 is latest version released on February 26, 2019
will receive bug fix and update on August 2019
also with the security fixes until about February 2020. It officially
release and now available, too
In laravel 5.8
version more upgrade and functionality are use in that like in that the php
dotenv latest version 3.0 is included it give to permission use more variables
and less coding. Carbon update with the mutable and immutable date type. Cache TTL changes, Automatic policy
resolution are also include with more transformer data and better functionality
with more features.
Features of the laravel 5.8
1) Email Validation:
In laravel 5.8
the email will allow for international characters in email address. Check the validate
email address or not in 5.7 is not pass so it's an advantage in that
update. In that the confirm of RFC6530
compliance with high functionality.
2) Php dotenv 3.0:
Dotenv 3.0 give
the more functionality using variables. Manage your application or project with
more relevance with the .env environment file. It best part is support the
multiline string and white space in that last of the environment file.
More flexibility
in environment of the reading and modify the file. No more trimming values in
that. Strong validation on variable name and avoid silent failures.
Also replace the
new Dotenv (...) with Dotenv::create (...)
3) Carbon V2:
Carbon v1 and
Carbon v2 both are use in laravel 5.8. Localization has changed quit bit in v2
and much better improvements in the v1.
Working on the Immutable and Mutable class for dateTime is the Mutable
so that benefit is that you easily implement it and do the date task. Carbon is
has built-in DateTimeImmutable class.
4) Cache TTL Changes:
TTL (TIME TO LIVE)
It is use when passing the integer to cache drivers to a second instead of
minutes.
Cache is use
seconds give to the users more granular control over the cache duration of
time. In use the DateTimeInterface to give better compatibility without more
changes and modification everything into seconds. Cache TTL Changes use also
add the minute’s example is that:
Cache::remember ('active-posts', now()->addMinutes(5), function ()
{
return Post::active()->get();
});
5) Deprecated string and array helper:
Don't be translator
that string and array helper are the deprecated. They offer little value over
using the class equivalents and laravel 5.8 is releasing the more package to
optional using this.
6) Automated policy Resolution:
Automated policy
Resolution give the more efficient conventional locations. You will not need to
register in the AppServiceProvider class.If you like to call your policy that
time you use custom callback using the Gate::guessPolicyNameUsing method.
If you not prefer
the convential path the time use the callback and ragister the policies to
continue to use $policy and configuration them manually.
7) Mailables directory name change:
This is less of the
new feature but an important element you will to use and aware of when
upgrading in that.
In your project
mailables is use you have customised the components on the project with php
artisan vendor:public. It more logical to make down the folder.
8) 404 error page:
In laravel 5.8 the
display the error page. With featuring very minimalist design. It is more
relevant and suitable page of website without the re-designing and easily to
fit them.
Its look the
different approch is use in that.
9) Nexmo and Slack Notification channels:
The Nexmo and
Slack Notification channel in remove form the laravel 5.8 and extract in the
first party package.
If you want to
continue with Nexmo and Slack you use the:
composer
require laravel/nexmo-notification-channel
composer
require laravel/slack-notification-channel
10) JSON Value in MySql:
If you are using
the MySql or MariaDB database column in that laravel5.7 would return value on
the double quotes. Laravel 5.8 return this value with the cleaner strings.
Example:
$value = DB::table('users')->value('options->language');
dump($value);
// Laravel 5.7…
' "en"
'
// Laravel 5.8…
'en'
11) Token guard & Token hashing:
Token guard provide
the basic Authentication, now support the storing API token as SHA-256 hashes.
In that also provide the improve connection between the authentication and hashing
the token with security.