Beispiel #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire(TemplateManager $manager)
 {
     try {
         $installed = $manager->findAndInstallNewTemplates();
         if (!count($installed)) {
             return $this->info('No templates to install');
         }
         foreach ($installed as $i) {
             list($theme, $template) = $i;
             $this->info("Installed {$template} in theme {$theme}");
         }
     } catch (PDOException $e) {
         $this->info('Unable to install templates: ' . $e->getMessage());
     }
 }
Beispiel #2
0
 public function index()
 {
     $manager = new TemplateManager(App::make('files'), TemplateFacade::getFacadeRoot());
     $manager->findAndInstallNewTemplates();
     return view($this->viewPrefix . 'index', ['templates' => TemplateFacade::findAll()]);
 }