| 1 | <?php namespace Arcanedev\Support\Bases; |
||
| 12 | abstract class FormRequest extends BaseFormRequest |
||
| 13 | { |
||
| 14 | /* ------------------------------------------------------------------------------------------------ |
||
| 15 | | Properties |
||
| 16 | | ------------------------------------------------------------------------------------------------ |
||
| 17 | */ |
||
| 18 | /** |
||
| 19 | * The errors format. |
||
| 20 | * |
||
| 21 | * @var string|null |
||
| 22 | */ |
||
| 23 | protected $errorsFormat = null; |
||
| 24 | |||
| 25 | /* ------------------------------------------------------------------------------------------------ |
||
| 26 | | Main Functions |
||
| 27 | | ------------------------------------------------------------------------------------------------ |
||
| 28 | */ |
||
| 29 | /** |
||
| 30 | * Determine if the user is authorized to make this request. |
||
| 31 | * |
||
| 32 | * @return bool |
||
| 33 | */ |
||
| 34 | public function authorize() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get the validation rules that apply to the request. |
||
| 41 | * |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | abstract public function rules(); |
||
| 45 | |||
| 46 | /* ------------------------------------------------------------------------------------------------ |
||
| 47 | | Other Functions |
||
| 48 | | ------------------------------------------------------------------------------------------------ |
||
| 49 | */ |
||
| 50 | /** |
||
| 51 | * {@inheritdoc} |
||
| 52 | */ |
||
| 53 | protected function formatErrors(Validator $validator) |
||
| 68 | } |
||
| 69 |