| 1 | <?php |
||
| 11 | class TicketReferenceRule implements Rule |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Determine if the ticket reference is valid |
||
| 16 | * Checks |
||
| 17 | * if value contains type and id |
||
| 18 | * if the model exists |
||
| 19 | * if the model is a instance of @param string $attribute |
||
| 20 | * |
||
| 21 | * @param mixed $value |
||
| 22 | * |
||
| 23 | * @return bool if the value is valid |
||
| 24 | * @link TicketReference |
||
| 25 | * if the user has rights to the model |
||
| 26 | * |
||
| 27 | */ |
||
| 28 | public function passes($attribute, $value) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get the validation error message. |
||
| 48 | * |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function message() |
||
| 55 | } |
||
| 56 |