public function use($theme, $frontend = true)
    {
        $key      = $frontend ? 'frontend' : 'backend';
        $theme    = $theme ?: config('themes.' . $key, 'default');
        $basePath = config('themes.path.' . $key, base_path('themes/' . $key));
        $this->removeBasePath();
        $this->setBasePath($basePath . DIRECTORY_SEPARATOR . $theme);

        config(['themes.' . $key => $theme]);
    }
public function use($theme, $frontend = true)
    {
        $key      = $frontend ? 'frontend' : 'backend';
        $theme    = $theme ?: config('themes.' . $key, 'default');
        $basePath = config('themes.path.' . $key, base_path('themes/' . $key));
        $this->removeBasePath();
        $this->setBasePath($basePath . DIRECTORY_SEPARATOR . $theme);

        config(['themes.' . $key => $theme]);
    }
public function use ( $ theme , $ frontend = true ) { $ key = $ frontend ? 'frontend' : 'backend' ; $ theme = $ theme ? : config ( 'themes.' . $ key , 'default' ) ; $ basePath = config ( 'themes.path.' . $ key , base_path ( 'themes/' . $ key ) ) ; $ this -> removeBasePath ( ) ; $ this -> setBasePath ( $ basePath . DIRECTORY_SEPARATOR . $ theme ) ; config ( [ 'themes.' . $ key => $ theme ] ) ; }
Use the given theme as the current theme.

@param string $theme
@param bool   $frontend
Use the given theme as the current theme .