original_string: 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);
              }
          }
  
      }
code: 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);
              }
          }
  
      }
code_tokens: 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 ) ; } } }
docstring: Processes not allowed response
  
  @param Request $request
  
  @return \Illuminate\Http\Response
docstring_tokens: Processes not allowed response