Let's get started quickly I found new things in Laravel 9.5 Released I wanted to share with you.
- New Wrap String Helper https://github.com/laravel/framework/pull/41455
Str:wrap('value')->wrap('"');
Str::of('value')->wrap('"');
str('value')->wrap('"');
// Outputs: "value"
Str:wrap('is', 'This ', ' me!');
Str::of('is')->wrap('This ', ' me!');
str('is')->wrap('This ', ' me!');
// Outputs: This is me!
- Allow Callables in Http::beforeSending() https://github.com/laravel/framework/pull/41489
accepting callables in the Http::beforeSending() method instead of only invokable classes. Now, the following example will work instead of getting a "Call to member function __invoke() on array"
Http::baseUrl('https://api.example.org')
->beforeSending([ $this, 'prepareRequest' ])
->asJson()
->withoutVerifying();
- callback support on implode Collection method https://github.com/laravel/framework/pull/41405
Before:
<span>{{ $user->cities->map(fn ($city) => $city->name.' ('.$city->state->name.')')->implode(', ') }}</span>
After:
<span>{{ $user->cities->implode(fn ($city) => $city->name.' ('.$city->state->name.')', ', ') }}</span>
- Redesign php artisan schedule:list Command https://github.com/laravel/framework/pull/41445
php artisan schedule:list
I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Source :- https://laravel-news.com/laravel-9-5-0
Source :- https://www.youtube.com/watch?v=IybDVyRkNRw
Top comments (0)