artisan
:
php artisan make:request UserRequest
Содержимое файле UserRequest
public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array*/ public function rules() { return [ 'name'=>'required|string', 'email'=>'required|string|unique:users|email', 'password'=>'required|confirmed' ]; }
Практика