src/Http/Middleware/AdminAuth.php
public function handle($request, Closure $next)
    {
        if ($this->auth->guest()) {
            if ($request->ajax()) {
                return $this->response->make('Unauthorized.', 401);
            } else {
                return $this->redirect->guest($this->config->get('entrust-gui.unauthorized-url', 'auth/login'));
            }
        } elseif (! $request->user()->hasRole($this->config->get('entrust-gui.middleware-role'))) {
            return $this->response->make('Unauthorized.', 401); //Or redirect() or whatever you want
        }
        return $next($request);
    }
public function handle($request, Closure $next)
    {
        if ($this->auth->guest()) {
            if ($request->ajax()) {
                return $this->response->make('Unauthorized.', 401);
            } else {
                return $this->redirect->guest($this->config->get('entrust-gui.unauthorized-url', 'auth/login'));
            }
        } elseif (! $request->user()->hasRole($this->config->get('entrust-gui.middleware-role'))) {
            return $this->response->make('Unauthorized.', 401); //Or redirect() or whatever you want
        }
        return $next($request);
    }
Handle the request

@param mixed $request
@param Closure $next

@return Response