Reputation: 2827
I've implemented the Basic Authentication described on the Laravel docs.
Part of the process is setting up Routes for Authentication on the routes.php file:
// Authentication routes...
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');
// Registration routes...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');
But, going through the AuthController inside the Auth directory, I cannot find those methods (getLogin, postLogin, etc.).
How does this work if the methods aren't there?
or
Where are those methods?
Upvotes: 1
Views: 133
Reputation: 538
As noted in the comments at the top of the AuthController..
By default, this controller uses a simple trait to add these behaviors.
... the 'AuthenticatesUsers' trait is where the methods listed in the question are called. You can find it at 'Illuminate\Foundation\Auth\AuthenticatesUsers'.
Upvotes: 4