Exemplo n.º 1
0
 /**
  * Show the documents for a project.
  * 
  * @param  string  $project
  * @param  int  $version
  * @param  string  $page
  * @return void
  */
 public function getDocs($project, $version, $page = 'index')
 {
     if (!($doc = $this->documents->get("{$project}/{$version}/{$page}"))) {
         throw new NotFoundHttpException();
     }
     $this->layout->title = $doc->getMeta('title');
     $this->layout->nest('nav', "docs.nav.{$project}");
     $this->layout->nest('content', 'docs.read', compact('doc'));
 }
Exemplo n.º 2
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $this->comment('Refreshing documentation cache...');
     $this->documents->forgetCollectionCache() and $this->documents->registerCollectionCache();
     $this->info('Documentation cache has been successfully refreshed.');
 }