TDoG-Skin/app/Http/Middleware/RedirectIfAuthenticated.php

14 lines
216 B
PHP
Raw Permalink Normal View History

2024-08-17 18:43:48 +08:00
<?php
namespace App\Http\Middleware;
use Auth;
class RedirectIfAuthenticated
{
public function handle($request, \Closure $next)
{
return Auth::check() ? redirect('user') : $next($request);
}
}