mirror of
https://github.com/flarum/core.git
synced 2025-07-30 13:10:24 +02:00
Instantiate DispatchRoute manually
Since we are already providing the first and only argument manually, we might as well instantiate the object manually. Same effect, same coupling, less code.
This commit is contained in:
@@ -66,7 +66,7 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||
|
||||
event(new ConfigureMiddleware($pipe, 'api'));
|
||||
|
||||
$pipe->pipe($app->make(DispatchRoute::class, ['routes' => $app->make('flarum.api.routes')]));
|
||||
$pipe->pipe(new DispatchRoute($app->make('flarum.api.routes')));
|
||||
|
||||
return $pipe;
|
||||
});
|
||||
|
Reference in New Issue
Block a user