<?php

namespace App\Http\Middleware;

use App\Http\Response\ResponseJson;
use Auth;
use Closure;

class Administrator
{
    use ResponseJson;

    public function handle($request, Closure $next)
    {
        $admin = Auth::guard('admin')->user();
        if ($admin->type != 'SUPER') return $this->jsonResponse(1,'无操作权限');
        return $next($request);
    }
}
