Answers for "rule::exists laravel table"

0

laravel custom exists rule

Validator::make($data, [
    'email' => [
        'required',
        Rule::exists('staff')->where(function ($query) {
            return $query->where('account_id', 1);
        }),
    ],
]);
Posted by: Guest on May-20-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language