Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 2 |
| LoginRequest | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 2 |
| authorize | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| rules | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace App\Http\Requests; | |
| use Illuminate\Support\Facades\Auth; | |
| use Illuminate\Foundation\Http\FormRequest; | |
| class LoginRequest extends FormRequest | |
| { | |
| /** | |
| * Determine if the user is authorized to make this request. | |
| * So the user must be guest | |
| * @return bool | |
| */ | |
| public function authorize() | |
| { | |
| return ! Auth::check(); | |
| } | |
| /** | |
| * Get the validation rules that apply to the request. | |
| * | |
| * @return array | |
| */ | |
| public function rules() | |
| { | |
| return [ | |
| 'email' => ['required', 'string', 'email'], | |
| 'password' => ['required', 'string', 'min:3'], | |
| ]; | |
| } | |
| } |