public function generate()
 {
     $files = $this->documentation->getAllFiles();
     $view = $this->viewFactory->make('documentation::route_templates.routes', compact('files'));
     $filePath = storage_path() . "/routes/documentation_routes.php";
     $fileContents = "<?php\n\n" . $view->render();
     $this->finder->put($filePath, $fileContents);
 }
Пример #2
0
 public function show($page)
 {
     try {
         $title = $this->documentation->getTitle($page);
     } catch (FileNotFoundException $e) {
         App::abort('404');
     }
     $subtitle = $this->documentation->getSubTitle($page);
     $content = $this->documentation->getContent($page);
     return view('doc.index', compact('content', 'title', 'subtitle'));
 }