There is a login method in the login controller, and there is a LoginRequest in front of its formal parameter $request. Through the built-in function of phpstorm, I found that clicking it can jump to a LoginRequest.php file, which stores user login restrictions. Conditions and corresponding error messages, what is the name of this usage? In which chapter of the manual can I view it?
Laravel service container instance tutorial - in-depth understanding of Inversion of Control (IoC) and Dependency Injection (DI)
This is called Form Request, which means that before the request enters the controller, the request can be verified and authorized.
https://laravel.com/docs/5.4/...
This is very basic. First of all, if you want to use this, you need to use the request file you want at the front of the controller. If you look at the top of your code, there must be a loginrequest code. You will use this below. For verification, just import it directly. The last step is to edit the loginrequest file to implement the verification rules. This prevents the code from being too lengthy and complex, and separates the various operations clearly. You can find it by searching in the document, just look for the part with request. Haha