Laravel - Authentication - Http Basic Authentication
HTTP Basic Authentication provides a quick way to authenticate users of your application without setting up a dedicated "login" page. To get started, attach the auth.basic
middleware to a route. The auth.basic
middleware is included with the Laravel framework, so you do not need to define it:
Route::get('/profile', function () {
// Only authenticated users may access this route...
})->middleware('auth.basic');
Once the middleware has been attached to the route, you will automatically be prompted for credentials when accessing the route in your browser. By default, the auth.basic
middleware will assume the email
column on your users
database table is the user's "username".