Dynamically load Custom Theme

Laraship QuestionsCategory: Theme CustomizationDynamically load Custom Theme
Eran Levi asked 3 years ago
Hello I have written a new custom theme (in VueJS) and it work great, the thing is, I want to use this theme only in my custom module I have written, and not in all pages, so the theme should be loaded in specific URLs or per module, it sounds like an easy task but I guess you can provide me the right way of doing it.
How can I switch the themes dynamically per URL\Module?   Thank you
1 Answers
laraship Staff answered 3 years ago
Hello Evan, You can add the following function under your controller and add your logic to decide with theme to load  
public function setTheme()
{
\Theme::set('your-theme-name');
}