@@ -22,17 +22,41 @@ public function rules()
22
22
'uses_times ' => 'required|boolean ' ,
23
23
'multiple_bookings_allowed ' => 'required|boolean ' ,
24
24
'is_oceanic_event ' => 'required|boolean ' ,
25
- 'dateEvent ' => 'required|date ' ,
26
25
'dep ' => 'exists:airports,id|required ' ,
27
26
'arr ' => 'exists:airports,id|required ' ,
28
- 'timeBeginEvent ' => 'required ' ,
29
- 'timeEndEvent ' => 'required ' ,
30
- 'dateBeginBooking ' => 'required|date ' ,
31
- 'timeBeginBooking ' => 'required ' ,
32
- 'dateEndBooking ' => 'required|date|after_or_equal:dateBeginBooking ' ,
33
- 'timeEndBooking ' => 'required ' ,
27
+ 'startEvent ' => 'required|date ' ,
28
+ 'endEvent ' => 'required|date|after_or_equal:startEvent ' ,
29
+ 'startBooking ' => 'required|date ' ,
30
+ 'endBooking ' => 'required|date|after_or_equal:startBooking ' ,
34
31
'image_url ' => 'nullable|url ' ,
35
32
'description ' => 'required:string ' ,
36
33
];
37
34
}
35
+
36
+ /**
37
+ * Get custom attributes for validator errors.
38
+ *
39
+ * @return array
40
+ */
41
+ public function attributes ()
42
+ {
43
+ return [
44
+ 'is_online ' => __ ('Show online? ' ),
45
+ 'show_on_homepage ' => __ ('Show on homepage? ' ),
46
+ 'name ' => __ ('Name ' ),
47
+ 'event_type_id ' => __ ('Event type ' ),
48
+ 'import_only ' => __ ('Only import? ' ),
49
+ 'uses_times ' => __ ('Show times? ' ),
50
+ 'multiple_bookings_allowed ' => __ ('Multiple bookings allowed? ' ),
51
+ 'is_oceanic_event ' => __ ('Oceanic event? ' ),
52
+ 'dep ' => __ ('Departure airport ' ),
53
+ 'arr ' => __ ('Arrival airport ' ),
54
+ 'startEvent ' => __ ('Start event ' ),
55
+ 'endEvent ' => __ ('End event ' ),
56
+ 'startBooking ' => __ ('Start booking ' ),
57
+ 'endBooking ' => __ ('End booking ' ),
58
+ 'image_url ' => __ ('Image URL ' ),
59
+ 'description ' => __ ('Description ' ),
60
+ ];
61
+ }
38
62
}
0 commit comments