TaoLer/app/middleware/LogedCheck.php
2020-01-18 13:10:32 +08:00

17 lines
268 B
PHP

<?php
namespace app\middleware;
use think\facade\Session;
class LogedCheck
{
public function handle($request, \Closure $next)
{
//已登陆跳出
if(Session::has('user_id')){
return redirect('/index/user/index');
}
return $next($request);
}
}