Example #1
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     include __DIR__ . '/../routes.php';
     $config = __DIR__ . '/../config/config.php';
     $this->mergeConfigFrom($config, 'larakit.lk-adminlte');
     $this->publishes([$config => config_path('larakit/lk-adminlte/config.php')]);
     $this->loadViewsFrom(__DIR__ . '/../views', 'lk-adminlte');
     if (\Request::is('admin*')) {
         \LaraPage::body()->addClass(config('larakit.lk-adminlte.body_class'));
     }
 }
Example #2
0
 /**
  * Назначить текущую тему оформления
  *
  * @param null $theme
  */
 static function setCurrent($theme = null)
 {
     //удалить все невостребованные классы тем оформления
     foreach (self::getThemes() as $t) {
         \LaraPage::body()->removeClass(self::getClassTheme($t));
     }
     //добавить класс текущей темы оформления
     \LaraPage::body()->addClass(self::getClassTheme($theme));
     self::$current = $theme;
     \Twig::addGlobal('current_theme', $theme);
 }
Example #3
0
 function frameBlock()
 {
     $block = \Route::input('block');
     \LaraPage::body()->setAttribute('class', '');
     $theme = \Request::input('theme');
     if ($theme) {
         \LaraPage::body()->addClass('theme--' . $theme);
     }
     return $this->setLayout('lk-makeup::!.layouts.frame_block')->response(['block' => $block, 'theme' => $theme]);
 }