123456789101112131415161718192021222324252627282930313233 |
- <?php
-
- namespace App\Http\Middleware;
-
- use Closure;
- use App\Common\Api;
-
- class SuperAuth
- {
-
-
- public function handle($request, Closure $next)
- {
-
- $userInfo = $request->session()->get('userInfo');
-
- if(empty($userInfo)){
- return redirect('manage');
- }
-
- if($userInfo['is_admin'] != 1){
- return redirect('https://s1-hn.aghcdn.com/activity/common/page/crowd/errEvir.html?error='.urlencode('无权访问'));
- }
-
- return $next($request);
- }
- }
|