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

31 lines
648 B
PHP

<?php
namespace App\Http\Requests\Bo\Formularies;
use Illuminate\Support\Facades\Gate;
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'));
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
$rules = [
'type' => 'nullable',
];
return \array_merge(parent::rules(), $rules);
}
}