1 | <?php namespace Arcanesoft\Auth\Http\Requests\Admin\Users; |
||
15 | abstract class UserFormRequest extends FormRequest |
||
16 | { |
||
17 | /* ----------------------------------------------------------------- |
||
18 | | Main Methods |
||
19 | | ----------------------------------------------------------------- |
||
20 | */ |
||
21 | /** |
||
22 | * Get the validation rules that apply to the request. |
||
23 | * |
||
24 | * @return array |
||
25 | */ |
||
26 | public function rules() |
||
34 | |||
35 | /** |
||
36 | * Sanitize all inputs. |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | protected function sanitize() |
||
46 | |||
47 | /** |
||
48 | * Get custom attributes for validator errors. |
||
49 | * |
||
50 | * @return array |
||
51 | */ |
||
52 | public function attributes() |
||
58 | |||
59 | /* ----------------------------------------------------------------- |
||
60 | | Other Methods |
||
61 | | ----------------------------------------------------------------- |
||
62 | */ |
||
63 | /** |
||
64 | * Sanitize the username. |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | protected function sanitizeUsername() |
||
76 | |||
77 | /** |
||
78 | * Get the email rule. |
||
79 | * |
||
80 | * @param string $column |
||
81 | * |
||
82 | * @return \Illuminate\Validation\Rules\Unique |
||
83 | */ |
||
84 | protected function getEmailRule($column = 'email') |
||
88 | |||
89 | /** |
||
90 | * Get the username rule. |
||
91 | * |
||
92 | * @param string $column |
||
93 | * |
||
94 | * @return \Illuminate\Validation\Rules\Unique |
||
95 | */ |
||
96 | protected function getUsernameRule($column = 'username') |
||
100 | |||
101 | /** |
||
102 | * Get the users table name. |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | protected function getUsersTable() |
||
110 | |||
111 | /** |
||
112 | * Get the roles rule. |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function getRolesRule() |
||
124 | } |
||
125 |