Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
changePasswordRequest
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 authorize
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 rules
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Http\Requests\Api\user;
4
5use App\Traits\requestApiTrait;
6use App\Traits\response;
7use Illuminate\Foundation\Http\FormRequest;
8use Illuminate\Contracts\Validation\Validator;
9use Illuminate\Http\Exceptions\HttpResponseException;
10
11class changePasswordRequest extends FormRequest
12{
13    use requestApiTrait;
14
15    /**
16     * Determine if the user is authorized to make this request.
17     *
18     * @return bool
19     */
20    public function authorize()
21    {
22        return true;
23    }
24
25    /**
26     * Get the validation rules that apply to the request.
27     *
28     * @return array<string, mixed>
29     */
30    public function rules()
31    {
32        return [
33            'old_password'      => 'required|string',
34            'password'          => 'required|string|min:6',
35            'confirm_password'  => 'required|string|same:password',
36        ];
37    }
38}