Apply theme globally; add mail templates into theme folder #715
This commit is contained in:
parent
fb7d988032
commit
09cd7adb6b
@ -45,6 +45,7 @@ class Kernel extends HttpKernel
|
||||
ShareErrorsFromSession::class,
|
||||
// VerifyCsrfToken::class,
|
||||
SubstituteBindings::class,
|
||||
SetActiveTheme::class,
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -15,6 +15,23 @@ class SetActiveTheme implements Middleware
|
||||
{
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
$skip = [
|
||||
'admin',
|
||||
'admin/*',
|
||||
'api',
|
||||
'api/*',
|
||||
'importer',
|
||||
'importer/*',
|
||||
'install',
|
||||
'install/*',
|
||||
'update',
|
||||
'update/*',
|
||||
];
|
||||
|
||||
if ($request->is($skip)) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
try {
|
||||
$theme = setting('general.theme');
|
||||
} catch (\Exception $e) {
|
||||
|
@ -39,7 +39,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
private function mapWebRoutes()
|
||||
{
|
||||
Route::group([
|
||||
'middleware' => ['web', 'theme'],
|
||||
'middleware' => ['web'],
|
||||
'namespace' => $this->namespace,
|
||||
], function ($router) {
|
||||
Route::group([
|
||||
|
Loading…
Reference in New Issue
Block a user