mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Shorten registration of routes
This commit is contained in:
@@ -40,11 +40,9 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||
});
|
||||
|
||||
$this->app->singleton('flarum.api.routes', function () {
|
||||
return new RouteCollection;
|
||||
});
|
||||
|
||||
$this->app->afterResolving('flarum.api.routes', function (RouteCollection $routes) {
|
||||
$routes = new RouteCollection;
|
||||
$this->populateRoutes($routes);
|
||||
return $routes;
|
||||
});
|
||||
|
||||
$this->app->singleton('flarum.api.middleware', function (Application $app) {
|
||||
|
Reference in New Issue
Block a user