original_string: protected function checkPermissionRedirect()
      {
          if (!$this->user->hasAccess('backend.access_dashboard')) {
              $true = function () { return true; };
              if ($first = array_first(BackendMenu::listMainMenuItems(), $true)) {
                  return Redirect::intended($first->url);
              }
          }
      }
code: protected function checkPermissionRedirect()
      {
          if (!$this->user->hasAccess('backend.access_dashboard')) {
              $true = function () { return true; };
              if ($first = array_first(BackendMenu::listMainMenuItems(), $true)) {
                  return Redirect::intended($first->url);
              }
          }
      }
code_tokens: protected function checkPermissionRedirect ( ) { if ( ! $ this -> user -> hasAccess ( 'backend.access_dashboard' ) ) { $ true = function ( ) { return true ; } ; if ( $ first = array_first ( BackendMenu :: listMainMenuItems ( ) , $ true ) ) { return Redirect :: intended ( $ first -> url ) ; } } }
docstring: Custom permissions check that will redirect to the next
  available menu item, if permission to this page is denied.
docstring_tokens: Custom permissions check that will redirect to the next available menu item if permission to this page is denied .