hypothetical/app/Http/Controllers/Auth/LoginController.php

43 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace App\Http\Controllers\Auth;
2016-08-19 16:38:49 -04:00
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
2016-08-19 16:38:49 -04:00
use Illuminate\Foundation\Auth\AuthenticatesUsers;
2024-03-19 17:11:58 -04:00
use Illuminate\Routing\Controllers\HasMiddleware;
use Illuminate\Routing\Controllers\Middleware;
2016-08-19 16:38:49 -04:00
2024-03-19 17:11:58 -04:00
class LoginController extends Controller implements HasMiddleware
{
2016-08-19 16:38:49 -04:00
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
2016-08-19 16:38:49 -04:00
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
2016-08-19 16:38:49 -04:00
/**
2024-03-19 17:11:58 -04:00
* Get the middleware that should be assigned to the controller.
2016-08-19 16:38:49 -04:00
*/
2024-03-19 17:11:58 -04:00
public static function middleware(): array
2016-08-19 16:38:49 -04:00
{
2024-03-19 17:11:58 -04:00
return [
new Middleware('guest', except: [ 'logout' ]),
];
2016-08-19 16:38:49 -04:00
}
}