The way I have tackled this is with a theme config containing two options.
'theme' => [
'style' => 'dark',
'src' => 'vendor',
],
I have a package that I use to store my themes that I create for a site. These generally contain a few folders.
themes
- assets
- less
- default
- dark
- js
- views
For the assets I use gulp when creating a new site to build the css and js. If the config is set to vendor, it uses these less files and thats all. If i set the config to local, it uses my local changes to the less files (which generally extend the vendor ones). The theme option in the config tells it which folder to look in.
For the views, you can do this one of two ways. First, in a service provider, register the new view like @mrterryh mentioned.
/**
* Register views
*
* @return void
*/
protected function registerViews()
{
$this->app['view']->addLocation(__DIR__ . '/../../views');
}
This is the method I call in my service providers register method. The second way is in Laravel's built in view.php config.
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [__DIR__.'/../views'],
This is an array of locations to look for views and it goes in order. Either way you do this, laravel will look in app/views first. If it does not find the view, it will look in each other registered location based on when it was registered (this allows you to control the order when using the service provider version by just changing the order you add them to app.php config).
Hope this helps. It's how I have been doing it and it adds the ability to create a set of core layouts/views and assets and easily overload them for the needs of a specific site.