Skip to content

Commit 65eddc6

Browse files
authored
Merge pull request #3134 from Laravel-Backpack/fix-middleware-inclusion
[4.X] Fix middleware inclusion if you want to override web with your own array.
2 parents 8109ca0 + 77ded60 commit 65eddc6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/routes/backpack/custom.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
Route::group([
1010
'prefix' => config('backpack.base.route_prefix', 'admin'),
11-
'middleware' => [
12-
config('backpack.base.web_middleware', 'web'),
13-
config('backpack.base.middleware_key', 'admin'),
14-
],
11+
'middleware' => array_merge(
12+
(array) config('backpack.base.web_middleware', 'web'),
13+
(array) config('backpack.base.middleware_key', 'admin')
14+
),
1515
'namespace' => 'App\Http\Controllers\Admin',
1616
], function () { // custom admin routes
1717
}); // this should be the absolute last line of this file

0 commit comments

Comments
 (0)