Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class UpdateRequest extends FormRequest |
||
8 | { |
||
9 | /** |
||
10 | * Determine if the user is authorized to make this request. |
||
11 | * |
||
12 | * @return bool |
||
13 | */ |
||
14 | public function authorize() |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Get the validation rules that apply to the request. |
||
21 | * |
||
22 | * @return array |
||
23 | */ |
||
24 | public function rules() |
||
25 | { |
||
26 | return [ |
||
27 | 'enrollments_start_at' => 'required|date', |
||
28 | 'enrollments_end_at' => 'required|date|after:enrollments_start_at', |
||
29 | 'exchanges_start_at' => 'required|date|after_or_equal:enrollments_start_at', |
||
30 | 'exchanges_end_at' => 'required|date|after:exchanges_start_at', |
||
31 | ]; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Get custom attributes for validator errors. |
||
36 | * |
||
37 | * @return array |
||
38 | */ |
||
39 | public function attributes() |
||
46 | ]; |
||
47 | } |
||
49 |