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 | | Other Methods |
||
49 | | ----------------------------------------------------------------- |
||
50 | */ |
||
51 | /** |
||
52 | * Sanitize the username. |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | protected function sanitizeUsername() |
||
64 | |||
65 | /** |
||
66 | * Get the email rule. |
||
67 | * |
||
68 | * @param string $column |
||
69 | * |
||
70 | * @return \Illuminate\Validation\Rules\Unique |
||
71 | */ |
||
72 | protected function getEmailRule($column = 'email') |
||
76 | |||
77 | /** |
||
78 | * Get the username rule. |
||
79 | * |
||
80 | * @param string $column |
||
81 | * |
||
82 | * @return \Illuminate\Validation\Rules\Unique |
||
83 | */ |
||
84 | protected function getUsernameRule($column = 'username') |
||
88 | |||
89 | /** |
||
90 | * Get the users table name. |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | protected function getUsersTable() |
||
98 | |||
99 | /** |
||
100 | * Get the roles rule. |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | protected function getRolesRule() |
||
112 | } |
||
113 |