14 lines
216 B
PHP
14 lines
216 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Auth;
|
|
|
|
class RedirectIfAuthenticated
|
|
{
|
|
public function handle($request, \Closure $next)
|
|
{
|
|
return Auth::check() ? redirect('user') : $next($request);
|
|
}
|
|
}
|