laravel backpack request rule I have 5 upload_multiple Field at least one of them must…
- User
laravel backpack request rule I have 5 upload_multiple Field at least one of them must filled, if no field filled must not save
- Assistant
To achieve this in Laravel Backpack, you can create a custom validation rule in your request. Here's how you can do it:
1/. In your app folder, create a new folder called "Rules" if it doesn't exist.
2/. Inside the "Rules" folder, create a new file called "AtLeastOneFileUploaded.php" and place the following code in it:
php