ldc-com-app-bo/app/Http/Requests/Bo/Formularies/UpdateFormularyRequest.php

32 lines
648 B
PHP
Raw Permalink Normal View History

2023-07-17 16:39:18 +02:00
<?php
namespace App\Http\Requests\Bo\Formularies;
use Illuminate\Support\Facades\Gate;
2023-07-17 16:39:18 +02:00
class UpdateFormularyRequest extends StoreFormularyRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize(): bool
{
return Gate::check('update', $this->route('formulary'));
}
2023-07-17 16:39:18 +02:00
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
2023-07-17 16:39:18 +02:00
{
$rules = [
'type' => 'nullable',
];
return \array_merge(parent::rules(), $rules);
}
}