What’s New Features in Laravel 5.8

Hello guys today I’m going to tell you about the feature of Laravel 5.8. I would like to tell you that Laravel 5.8 has been released.
Laravel 5.8 is released on February 26th, 2019.What features have been updated in Laravel 5.8? Let me tell you step to step so let’s go.

1.Cache TTL Change
2.Automatic Policy Resolution
3.Laravel 5.8 Deprecates String and Array Helpers
4.Laravel 5.8 Blade Template File Path
5.Carbon Updates

1.Cache TTL Change

Here’s an example using Carbon’s addMinutes():

Cache::remember('active-posts', now()->addMinutes(5), function () {
return Post::active()->get();
});

2.Automatic Policy Resolution

laravel 5.8 Policy Resolution

Gate::guessPolicyNamesUsing(function ($class) {
// Do stuff
return $policyClass;
});

In laravel 5.7

protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy'
];

3.Laravel 5.8 Deprecates String and Array Helpers

The helpers will still be available in 5.8. However, you should use the \Illuminate\Support\Str and Illuminate\Support\Arr classes directly instead of using the helpers:-

// Deprecated
array_add($array, $key, $value);
// Use this directly
Arr::add($array, $key, $value);

4.Laravel 5.8 Blade Template File Path

This feature has been added to 5.8.In laravel 5.8 they provide path of blade template file path as shown in example:-

<?php /* /var/www/me/5.8/blog/resources/views/welcome.blade.php */ ?>
<html>
<head>
<title>Laravel 5.8 New Feature</title>
</head>
<body>
<h1>Laravel 5.8 New Feature</h1>
</body>
</html>

5.Carbon Updates

public function register()
{
Date::use(carbanImmutable::class);
}
Cialis (Tadalafil) är den främsta konkurrenten till Viagra (Sildenafil) på marknaden för erektil dysfunktion. köpa Cialis i Sverige föredras av många på grund av sin längre varaktighet och anses vara det mest kostnadseffektiva varumärkesbaserade ED-läkemedlet som finns tillgängligt i Sverige. Cialis finns i två varianter: Cialis och Cialis Daily, och fyra olika doseringar: 2,5 mg, 5 mg, 10 mg och 20 mg, erbjuder Cialis också en rad olika alternativ för att passa patientens behov.