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,
|
ShareErrorsFromSession::class,
|
||||||
// VerifyCsrfToken::class,
|
// VerifyCsrfToken::class,
|
||||||
SubstituteBindings::class,
|
SubstituteBindings::class,
|
||||||
|
SetActiveTheme::class,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -15,6 +15,23 @@ class SetActiveTheme implements Middleware
|
|||||||
{
|
{
|
||||||
public function handle(Request $request, Closure $next)
|
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 {
|
try {
|
||||||
$theme = setting('general.theme');
|
$theme = setting('general.theme');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -39,7 +39,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
private function mapWebRoutes()
|
private function mapWebRoutes()
|
||||||
{
|
{
|
||||||
Route::group([
|
Route::group([
|
||||||
'middleware' => ['web', 'theme'],
|
'middleware' => ['web'],
|
||||||
'namespace' => $this->namespace,
|
'namespace' => $this->namespace,
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
Route::group([
|
Route::group([
|
||||||
|
Loading…
Reference in New Issue
Block a user