mirror of
https://github.com/flarum/framework.git
synced 2025-02-06 19:47:12 +08:00
parent
e27cd69974
commit
9f3770eedb
|
@ -43,6 +43,10 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||||
return new RouteCollection;
|
return new RouteCollection;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->app->afterResolving('flarum.api.routes', function (RouteCollection $routes) {
|
||||||
|
$this->populateRoutes($routes);
|
||||||
|
});
|
||||||
|
|
||||||
$this->app->singleton('flarum.api.middleware', function (Application $app) {
|
$this->app->singleton('flarum.api.middleware', function (Application $app) {
|
||||||
$pipe = new MiddlewarePipe;
|
$pipe = new MiddlewarePipe;
|
||||||
|
|
||||||
|
@ -90,8 +94,6 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
$this->populateRoutes($this->app->make('flarum.api.routes'));
|
|
||||||
|
|
||||||
$this->registerNotificationSerializers();
|
$this->registerNotificationSerializers();
|
||||||
|
|
||||||
AbstractSerializeController::setContainer($this->app);
|
AbstractSerializeController::setContainer($this->app);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user