Exemplo n.º 1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     $memory = $this->laravel['orchestra.memory'];
     $themes = $this->finder->detect();
     $frontend = $memory->get('site.theme.frontend');
     $backend = $memory->get('site.theme.backend');
     $header = ['ID', 'Theme Name', 'Frontend', 'Backend'];
     $content = [];
     foreach ($themes as $id => $theme) {
         $content[] = [$id, $theme->get('name'), $this->getThemeStatus('frontend', $theme, $id == $frontend), $this->getThemeStatus('backend', $theme, $id == $backend)];
     }
     $this->table($header, $content);
 }
Exemplo n.º 2
0
 /**
  * Get all available theme by type.
  *
  * @param  string  $type
  *
  * @return \Illuminate\Support\Collection
  */
 protected function getAvailableTheme($type)
 {
     $themes = $this->finder->detect();
     return $themes->filter(function (Manifest $manifest) use($type) {
         $group = $manifest->get('type');
         if (!empty($group) && !in_array($type, $group)) {
             return;
         }
         return $manifest;
     });
 }