Answers for "Rule laravel"

PHP
0

Rule in in laravel

use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;

Validator::make($data, [
    'zones' => [
        'required',
        Rule::in(['first-zone', 'second-zone']),
    ],
]);
Posted by: Guest on July-07-2021

Browse Popular Code Answers by Language