I think this link might give you some info https://laracast.blogspot.com/2016/06/laravel-layout-and-blade-template.html
pretty easy, cant give all the code because it a lot, basically this is what needs to be done.
you need a ThemeServiceProvider class that loads view, lang, asset files for the current theme, basically this will search for the files in a specified directory and load them. use the methods mergeConfigFrom, loadViewsFrom, loadTranslationsFrom, in the ServiceProvider class to load files from a specific folder. refer to https://github.com/laravel/framework/blob/5.2/src/Illuminate/Support/ServiceProvider.php
These methods support input paths as arrays, the first array element will be your theme directory while the seconds should be your fallback theme directory, in your service provider you call it like this. so the current theme will always override the base theme
$this->loadViewsFrom([$currentThemeViewsPath, $defaultViewsPath], $someNamespace);
i hope it helps.
here's a sample from something i'm working on https://github.com/codebreez/collejo-core/blob/master/Providers/Module/ModuleServiceProvider.php#L14
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community