359 Select theme in settings (#423)

* Update composer package versions

* Laravel version

* Change theme in the admin settings page closes #359

* Fix comment
This commit is contained in:
Nabeel S
2019-10-30 09:05:18 -04:00
committed by GitHub
parent eff9f6fec6
commit ec4f10d43a
10 changed files with 391 additions and 339 deletions

View File

@@ -0,0 +1,22 @@
<?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);
}
}