/**
  * Handle a navigation.main event second.
  *
  * @return void
  */
 public function onNavigationMainThird()
 {
     // get the pages
     $pages = $this->pagerepository->navigation();
     // select the home page
     $page = $pages[0];
     // add the page to the start of the main nav bars
     $this->navigation->addToMain($page, 'default', true);
     $this->navigation->addToMain($page, 'admin', true);
     // add the view users link
     if ($this->credentials->check() && $this->credentials->hasAccess('mod')) {
         $this->navigation->addToMain(['title' => 'Users', 'slug' => 'users', 'icon' => 'user'], 'admin');
     }
 }
 /**
  * Handle a command.updatecache event.
  *
  * @param \Illuminate\Console\Command $command
  *
  * @return void
  */
 public function onUpdateCache(Command $command)
 {
     $command->line('Regenerating page cache...');
     $this->pagerepository->refresh();
     $command->info('Page cache regenerated!');
 }