1 | <?php namespace VojtaSvoboda\Reservations\Validators; |
||
13 | class ReservationsValidators extends Validator |
||
14 | { |
||
15 | /** |
||
16 | * Validate reservation. Called on date attribute. Validate date availability. |
||
17 | * |
||
18 | * Other available variables: $this->translator, $this->data, $this->rules a $this->messages. |
||
19 | * |
||
20 | * @param string $attribute Name of the validated field. |
||
21 | * @param mixed $value Field value. |
||
22 | * |
||
23 | * @return bool |
||
24 | */ |
||
25 | public function validateReservation($attribute, $value) |
||
36 | |||
37 | /** |
||
38 | * Replace placeholder :reservation with custom text. |
||
39 | * |
||
40 | * @param string $message |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | protected function replaceReservation($message) |
||
50 | |||
51 | /** |
||
52 | * Get date as Carbon instance. |
||
53 | * |
||
54 | * @param string $date |
||
55 | * |
||
56 | * @return Carbon |
||
57 | */ |
||
58 | private function getDateAsCarbon($date) |
||
62 | |||
63 | /** |
||
64 | * Get Reservations facade. |
||
65 | * |
||
66 | * @return ReservationsFacade |
||
67 | */ |
||
68 | private function getFacade() |
||
72 | } |
||
73 |