September 2017
Intermediate to advanced
244 pages
6h 44m
English
To invalidate token, in other words, to log out user, the invalidateToken() method will be used. This method will be called through a route. We will add the following route with the delete request method, which will call AuthController::invalidateToken() from the routed file:
$api->delete( '/', [ 'uses' => 'Auth/AuthController@invalidateToken', 'as' => 'api.auth.invalidate' ]);
Read now
Unlock full access