Some important features of this release Laravel 9.30

Some important features of this release Laravel 9.30

dev.to - Sep 22

In the new version 9.30 we have Some of the new features, including Add RequiredIfAccepted validation rule, Read-only filesystem config option, and force option to all make commands, which are some of the important features that I found in this release.

required_if_accepted validation rule which ensures the field under validation is required if another field is accepted (a value of yes, on, 1, or true)

Validator::make([
    'is_company'   => 'on',
    'company_name' => 'Apple',
], [
    'is_company'   => 'required|boolean',
    'company_name' => 'required_if_accepted:is_company',
]);
Enter fullscreen mode Exit fullscreen mode

configuring a filesystem disk to operate in read-only mode. This ensures no write operations are possible on the disk, which is useful when accessing storage you want to ensure doesn't manipulate any files

$disk = $filesystem->build([
    'driver' => 'local',
    'read-only' => true,
    'root' => 'my-custom-path',
    'url' => 'my-custom-url',
    'visibility' => 'public',
]);
Enter fullscreen mode Exit fullscreen mode

--force flag to all make:* commands, which is helpful when you need to recreate a file
More about --force :-
https://www.youtube.com/watch?v=NYJx3YpuivM

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-30-0
Source :- https://www.youtube.com/watch?v=6BkP6TuUmWs

MORE ARTICLES