laravel validatio required if another field is present code example Example: laravel required if another field has value 'last_name' => 'required_if:another_field,value'