September 2017
Intermediate to advanced
244 pages
6h 44m
English
Log in is being done in the login() method, and it tries to log in using JWTAuth::attempt($this->getCredentials($request)) . If credentials are not valid or if there is some other problem, it will just return an error. However, to access this login() method, we need to add a route for it. Here is what we will add in routes/web.php:
$api->post( '/auth/login', [ 'as' => 'api.auth.login', 'uses' => 'Auth\AuthController@login', ]);
Read now
Unlock full access