1 | <?php namespace Arcanesoft\Blog\Http\Requests\Backend\Posts; |
||
11 | class UpdatePostRequest extends FormRequest |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Properties |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * Category validation rules. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $rules = [ |
||
23 | 'title' => 'required|max:255', |
||
24 | 'excerpt' => 'required|max:200', |
||
25 | 'content' => 'required', |
||
26 | 'category' => 'required|min:1', |
||
27 | 'tags' => 'required|array|min:1', |
||
28 | 'publish_date' => 'required', |
||
29 | 'status' => 'required', |
||
30 | ]; |
||
31 | |||
32 | /* ------------------------------------------------------------------------------------------------ |
||
33 | | Main Functions |
||
34 | | ------------------------------------------------------------------------------------------------ |
||
35 | */ |
||
36 | /** |
||
37 | * Determine if the user is authorized to make this request. |
||
38 | * |
||
39 | * @return bool |
||
40 | */ |
||
41 | public function authorize() |
||
45 | |||
46 | /** |
||
47 | * Get the validation rules that apply to the request. |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | public function rules() |
||
55 | } |
||
56 |