ec4f10d43a
* Update composer package versions * Laravel version * Change theme in the admin settings page closes #359 * Fix comment
23 lines
409 B
PHP
23 lines
409 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Closure;
|
|
use Igaster\LaravelTheme\Facades\Theme;
|
|
|
|
/**
|
|
* Read the current theme from the settings (set in admin), and set it
|
|
*/
|
|
class SetActiveTheme
|
|
{
|
|
public function handle($request, Closure $next)
|
|
{
|
|
$theme = setting('general.theme');
|
|
if (!empty($theme)) {
|
|
Theme::set($theme);
|
|
}
|
|
|
|
return $next($request);
|
|
}
|
|
}
|