pingpong-labs / themes

Laravel 5 Themes
https://pingpong-labs.github.io/docs/themes.html
BSD 3-Clause "New" or "Revised" License
24 stars 15 forks source link

Default view files #23

Open KyleMassacre opened 8 years ago

KyleMassacre commented 8 years ago

Ok, so I am a total n00b with Laravel and I am using v5.2. But is there a way to use the default view folder if a view is not found in the theme?

Also, one other question is: What is the easiest way to set the theme based off of a controller? Currently I have a Controller which all my controllers are based off of and am trying something like this:

//Controller
public function __construct()
{
    if(property_exists($this,'theme') && Theme::exists($this->theme))
    {
        Theme::set($this->theme);
    }
    else
    {
        $this->theme = env('DEFAULT_THEME','admin');
        Theme::set($this->theme);
    }
}