Let's get started quickly I found new things in Laravel 9.20 Released I wanted to share with you.
- allow Collection random() to accept a callable https://github.com/laravel/framework/pull/43028
$comments = $user->comments->random(5); // Now $comments = $user->comments; $comments = $comments->random(min(5, count($comments))); $comments = $user->comments->random(fn($items) => min(5, count($items)));
- feature: Str::inlineMarkdown() https://github.com/laravel/framework/pull/43126
Str::markdown('Use [Laravel](https://laravel.com)!') // <p>Use <a href="https://laravel.com">Laravel</a>!</p> Str::inlineMarkdown('Use [Laravel](https://laravel.com)!') // Use <a href="https://laravel.com">Laravel</a>!
- Added required directive https://github.com/laravel/framework/pull/43103
<input type='email' name="email" @required( !auth()->user()->is_admin )> <input type='password' name="password" @required( !auth()->user()->is_admin )>
- Add replicateQuietly to Model https://github.com/laravel/framework/pull/43141 This method is similar to the existing saveQuietly, incrementQuietly, decrementQuietly...
$replicated = $model->replicateQuietly();
- Change Policy 403 Code For Security https://github.com/laravel/framework/pull/43097
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://www.youtube.com/watch?v=gHpurEE5Lfs
Source :- https://www.youtube.com/watch?v=kkwQLpIitdE