Skip to content

Commit 1e540d6

Browse files
committed
apply middleware to all routes
1 parent b874a83 commit 1e540d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/NativeServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Console\Application;
66
use Illuminate\Foundation\Application as Foundation;
7-
use Illuminate\Routing\Router;
7+
use Illuminate\Foundation\Http\Kernel;
88
use Illuminate\Support\Arr;
99
use Illuminate\Support\Facades\Artisan;
1010
use Illuminate\Support\Facades\DB;
@@ -87,9 +87,9 @@ public function packageRegistered()
8787
);
8888

8989
// Automatically prevent browser access
90-
$this->app->make(Router::class)->pushMiddlewareToGroup('web', [
90+
$this->app->make(Kernel::class)->pushMiddleware(
9191
PreventRegularBrowserAccess::class,
92-
]);
92+
);
9393

9494
Application::starting(function ($app) {
9595
$app->resolveCommands([

0 commit comments

Comments
 (0)