blessing-skin-server/app/Http/Middleware/RedirectIfAuthenticated.php

14 lines
243 B
PHP
Raw Normal View History

2016-08-28 10:05:21 +08:00
<?php
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Auth;
2016-08-28 10:05:21 +08:00
class RedirectIfAuthenticated
{
public function handle($request, \Closure $next)
{
return Auth::check() ? redirect('user') : $next($request);
2016-08-28 10:05:21 +08:00
}
}