-
Notifications
You must be signed in to change notification settings - Fork 70
Setting The Active Theme
Nguyễn Trần Chung edited this page Oct 7, 2018
·
6 revisions
Setting the active theme is incredibly easy. There are two methods that you can use, which will be covered below.
You may define your default active theme through the provided config file. This is the easiest way if you don't plan on supporting many themes within your application.
config/themes.php
...
'active' => 'foobar'
...If you're building a larger application that may provide the means to dynamically change the theme, then you may do so through the use of the Theme::set() method. The most common place to put this call is from within a base Controller's __construct() method.
app/Http/Controllers/Controller.php
use Theme;
...
public function __construct()
{
Theme::set('foobar');
}
...