Skip to content

Commit c3a90dc

Browse files
committed
Add inject router
1 parent 87b24d4 commit c3a90dc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ExpoPushNotificationsServiceProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ExpoPushNotificationsServiceProvider extends ServiceProvider
1616
*
1717
* @return void
1818
*/
19-
public function boot()
19+
public function boot(\Illuminate\Routing\Router $router)
2020
{
2121
$this->setupConfig();
2222

@@ -29,9 +29,7 @@ public function boot()
2929
->give(function () use ($repository) {
3030
return new Expo(new ExpoRegistrar($repository));
3131
});
32-
33-
$router = $this->app->make(Router::class);
34-
// It's also possible to add a middleware group
32+
3533
$router->middlewareGroup('expo.middleware', config("exponent-push-notifications")["middleware"]);
3634

3735
$this->loadRoutesFrom(__DIR__.'/Http/routes.php');

0 commit comments

Comments
 (0)