コード例 #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());
     }
 }
コード例 #2
0
ファイル: Templates.php プロジェクト: imanghafoori1/boom-core
 public function index()
 {
     $manager = new TemplateManager(App::make('files'), TemplateFacade::getFacadeRoot());
     $manager->findAndInstallNewTemplates();
     return view($this->viewPrefix . 'index', ['templates' => TemplateFacade::findAll()]);
 }