diff --git a/framework/core/src/Admin/AdminServiceProvider.php b/framework/core/src/Admin/AdminServiceProvider.php index f7dcab95a..5e61729bd 100644 --- a/framework/core/src/Admin/AdminServiceProvider.php +++ b/framework/core/src/Admin/AdminServiceProvider.php @@ -43,6 +43,7 @@ class AdminServiceProvider extends AbstractServiceProvider $this->app->singleton('flarum.admin.routes', function () { $routes = new RouteCollection; $this->populateRoutes($routes); + return $routes; }); diff --git a/framework/core/src/Api/ApiServiceProvider.php b/framework/core/src/Api/ApiServiceProvider.php index f3937e7ec..eb077259c 100644 --- a/framework/core/src/Api/ApiServiceProvider.php +++ b/framework/core/src/Api/ApiServiceProvider.php @@ -42,6 +42,7 @@ class ApiServiceProvider extends AbstractServiceProvider $this->app->singleton('flarum.api.routes', function () { $routes = new RouteCollection; $this->populateRoutes($routes); + return $routes; }); diff --git a/framework/core/src/Forum/ForumServiceProvider.php b/framework/core/src/Forum/ForumServiceProvider.php index 4a975aa22..fff5aa788 100644 --- a/framework/core/src/Forum/ForumServiceProvider.php +++ b/framework/core/src/Forum/ForumServiceProvider.php @@ -48,6 +48,7 @@ class ForumServiceProvider extends AbstractServiceProvider $this->app->singleton('flarum.forum.routes', function () { $routes = new RouteCollection; $this->populateRoutes($routes); + return $routes; }); diff --git a/framework/core/src/Update/UpdateServiceProvider.php b/framework/core/src/Update/UpdateServiceProvider.php index 4ef233101..a23a06fa4 100644 --- a/framework/core/src/Update/UpdateServiceProvider.php +++ b/framework/core/src/Update/UpdateServiceProvider.php @@ -25,6 +25,7 @@ class UpdateServiceProvider extends AbstractServiceProvider $this->app->singleton('flarum.update.routes', function () { $routes = new RouteCollection; $this->populateRoutes($routes); + return $routes; }); }