Merge pull request #717 from nabeelio/715-Theme
Apply theme globally; add mail templates into theme folder #715
This commit is contained in:
commit
5f8053226e
@ -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