| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | class StoreWardRequest extends FormRequest |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Determine if the user is authorized to make this request. |
||
| 15 | * |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | public function authorize() : bool |
||
| 19 | { |
||
| 20 | $user = Auth::user(); |
||
| 21 | return |
||
| 22 | $user->can("create", Ward::class) && |
||
| 23 | $user->can("update", Ward::class); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get the validation rules that apply to the request. |
||
| 28 | * |
||
| 29 | * @return array |
||
| 30 | */ |
||
| 31 | public function rules() : array |
||
| 47 | } |
||
| 48 | } |
||
| 49 |