So we have a project that uses Caffeinated Modules and Themes (great stuff!) with Laravel Spark. I ran into an issue with this package combination that I thought was worth sharing with you.
According to the Themes documentation we put in the controller something like:
But, in Spark we don't have access to all controllers (at least not without getting really under the hood). But this was easy to resolve by putting the Theme::setLayout line into our AppServiceProvider.php's boot method, and instead of using $theme_layout I use this in my blades:
@extends(\Theme::getLayout())
With this all appears to work as expected. Might be worth updating the docs?
So we have a project that uses Caffeinated Modules and Themes (great stuff!) with Laravel Spark. I ran into an issue with this package combination that I thought was worth sharing with you.
According to the Themes documentation we put in the controller something like:
In the blade we put this:
But, in Spark we don't have access to all controllers (at least not without getting really under the hood). But this was easy to resolve by putting the
Theme::setLayout
line into ourAppServiceProvider.php
's boot method, and instead of using$theme_layout
I use this in my blades:With this all appears to work as expected. Might be worth updating the docs?