* Refactor and add importer to Installer module #443 * Refactor for finances to use in import * Import groups into roles * Formatting * Formatting * Add interface in installer for import * Notes about importing * Check for installer folder * Formatting * Fix pirep->user mapping * Unused import * Formatting
25 lines
498 B
PHP
25 lines
498 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use App\Contracts\Middleware;
|
|
use Closure;
|
|
use Igaster\LaravelTheme\Facades\Theme;
|
|
use Illuminate\Http\Request;
|
|
|
|
/**
|
|
* Read the current theme from the settings (set in admin), and set it
|
|
*/
|
|
class SetActiveTheme implements Middleware
|
|
{
|
|
public function handle(Request $request, Closure $next)
|
|
{
|
|
$theme = setting('general.theme');
|
|
if (!empty($theme)) {
|
|
Theme::set($theme);
|
|
}
|
|
|
|
return $next($request);
|
|
}
|
|
}
|