mirror of
https://github.com/flarum/core.git
synced 2025-10-28 22:07:33 +01:00
fixed container bindings use of container (#2807)
This commit is contained in:
@@ -20,29 +20,25 @@ class UpdateServiceProvider extends AbstractServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->container->singleton('flarum.update.routes', function () {
|
||||
$this->container->singleton('flarum.update.routes', function (RouteHandlerFactory $route) {
|
||||
$routes = new RouteCollection;
|
||||
$this->populateRoutes($routes);
|
||||
$this->populateRoutes($routes, $route);
|
||||
|
||||
return $routes;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.update');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RouteCollection $routes
|
||||
* @param RouteCollection $routes
|
||||
* @param RouteHandlerFactory $route
|
||||
*/
|
||||
protected function populateRoutes(RouteCollection $routes)
|
||||
protected function populateRoutes(RouteCollection $routes, RouteHandlerFactory $route)
|
||||
{
|
||||
$route = $this->container->make(RouteHandlerFactory::class);
|
||||
|
||||
$routes->get(
|
||||
'/{path:.*}',
|
||||
'index',
|
||||
|
||||
Reference in New Issue
Block a user