| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class VillageStoreRequest extends FormRequest |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Get the validation rules that apply to the request. |
||
| 13 | * |
||
| 14 | * @return array |
||
| 15 | */ |
||
| 16 | public function rules() |
||
| 17 | { |
||
| 18 | return [ |
||
| 19 | 'id' => ['required', 'max:10', Rule::unique((new Village())->getTable())->ignore($this->previous_id, 'id')], |
||
| 20 | 'name' => ['required'], |
||
| 21 | 'district_id' => ['required'], |
||
| 22 | 'meta' => 'nullable', |
||
| 23 | ]; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Determine if the user is authorized to make this request. |
||
| 28 | * |
||
| 29 | * @return bool |
||
| 30 | */ |
||
| 31 | public function authorize() |
||
| 34 | } |
||
| 35 | } |
||
| 36 |