protected function setCurrentTheme(Application $app, Theme $theme): void
    {
        $memory = $app->make('orchestra.memory')->makeOrFallback();
        $events = $app->make('events');

        // By default, we should consider all request to use "frontend"
        // theme and only convert to use "backend" routing when certain
        // event is fired.
        $theme->setTheme($memory->get('site.theme.frontend'));

        $events->listen('orchestra.started: admin', function () use ($theme, $memory) {
            $theme->setTheme($memory->get('site.theme.backend'));
        });

        $events->listen('composing: *', function () use ($theme) {
            $theme->boot();
        });
    }
protected function setCurrentTheme(Application $app, Theme $theme): void
    {
        $memory = $app->make('orchestra.memory')->makeOrFallback();
        $events = $app->make('events');

        // By default, we should consider all request to use "frontend"
        // theme and only convert to use "backend" routing when certain
        // event is fired.
        $theme->setTheme($memory->get('site.theme.frontend'));

        $events->listen('orchestra.started: admin', function () use ($theme, $memory) {
            $theme->setTheme($memory->get('site.theme.backend'));
        });

        $events->listen('composing: *', function () use ($theme) {
            $theme->boot();
        });
    }
protected function setCurrentTheme ( Application $ app , Theme $ theme ) : void { $ memory = $ app -> make ( 'orchestra.memory' ) -> makeOrFallback ( ) ; $ events = $ app -> make ( 'events' ) ; // By default, we should consider all request to use "frontend" // theme and only convert to use "backend" routing when certain // event is fired. $ theme -> setTheme ( $ memory -> get ( 'site.theme.frontend' ) ) ; $ events -> listen ( 'orchestra.started: admin' , function ( ) use ( $ theme , $ memory ) { $ theme -> setTheme ( $ memory -> get ( 'site.theme.backend' ) ) ; } ) ; $ events -> listen ( 'composing: *' , function ( ) use ( $ theme ) { $ theme -> boot ( ) ; } ) ; }
Set current theme for request.

@param  \Illuminate\Contracts\Foundation\Application  $app
@param  \Orchestra\Contracts\Theme\Theme  $theme

@return void
Set current theme for request .