| 1 | <?php |
||
| 8 | class ChangePasswordRequest extends FormRequest |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Determine if the user is authorized to make this request. |
||
| 12 | * |
||
| 13 | * @return bool |
||
| 14 | */ |
||
| 15 | public function authorize() |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Get the validation rules that apply to the request. |
||
| 23 | * |
||
| 24 | * @return array |
||
| 25 | */ |
||
| 26 | public function rules() |
||
| 27 | { |
||
| 28 | return [ |
||
| 29 | 'old_password' => 'required', |
||
| 30 | 'new_password' => 'required|min:6', |
||
| 31 | 'confirm_password' => 'required|same:new_password|min:6', |
||
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Configure the validator instance. |
||
| 37 | * |
||
| 38 | * @param \Illuminate\Validation\Validator $validator |
||
| 39 | * |
||
| 40 | * @return void |
||
| 41 | */ |
||
| 42 | public function withValidator($validator) |
||
| 51 | } |
||
| 52 |