public function getIndex()
 {
     $themes = [];
     $themesPath = base_path('resources/views/themes');
     if (is_dir($themesPath)) {
         foreach (Theme::all() as $databaseTheme) {
             $databaseThemes[$databaseTheme->theme] = $databaseTheme;
         }
         foreach (scandir($themesPath) as $themeFolder) {
             if (is_dir($themesPath . '/' . $themeFolder) && strpos($themeFolder, '.') !== 0) {
                 if (isset($databaseThemes[$themeFolder])) {
                     $themes[$databaseThemes[$themeFolder]->id] = $databaseThemes[$themeFolder]->theme;
                 }
             }
         }
     }
     $blockSettings = [];
     foreach (Block::getBlockClasses() as $blockName => $blockClass) {
         foreach ($blockClass::$blockSettings as $name => $action) {
             if (!empty($action) && Auth::action(str_replace('/', '.', $action))) {
                 $blockSettings[$name] = $action;
             }
         }
     }
     $this->layoutData['content'] = View::make('coaster::pages.themes', ['themes' => $themes, 'themes_count' => Theme::count(), 'blockSettings' => $blockSettings]);
 }