AY
Size: a a a
AY
AY
LD
$menu = [
'type' => 'post',
//'post_id' => 1,
'category_id' => 1,
'external_link' => 'asdfasdf',
];
try{
\Illuminate\Support\Facades\Validator::make(
$menu,
[
'type' => 'required|string',
'post_id' => 'required_if:type,post',
'category_id' => 'required_if:type,category',
'external_link' => 'required_if:type,link',
],
)->validate();
} catch (\Illuminate\Validation\ValidationException $exception) {
dd($exception->errors());
}
SC
AY
SC
AB
AY
SC
AY
SC
EG
AY
AY
EG
SC
AY
AB
AY