protected function notAllowed(Request $request)
    {
        if ($request->ajax()) {
            return response('Unauthorized.', 401);
        } else {
            $action = $this->config->get('zendacl.action', 'redirect');
            if ($action == 'redirect') {
                $url = $this->config->get('zendacl.redirect', 'auth/login');
                return redirect($url);
            } elseif ($action == 'route') {
                $route = $this->config->get('zendacl.redirect');
                return redirect()->route($route);
            } elseif ($action == 'view') {
                $view = $this->config->get('zendacl.view', 'zendacl::unauthorized');
                return view($view);
            }
        }

    }