Merge pull request #717 from nabeelio/715-Theme

Apply theme globally; add mail templates into theme folder #715
This commit is contained in:
Nabeel S 2020-05-22 21:49:22 -04:00 committed by GitHub
commit 5f8053226e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 19 additions and 1 deletions

View File

@ -45,6 +45,7 @@ class Kernel extends HttpKernel
ShareErrorsFromSession::class,
// VerifyCsrfToken::class,
SubstituteBindings::class,
SetActiveTheme::class,
],
];

View File

@ -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) {

View File

@ -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([