mirror of
https://github.com/flarum/framework.git
synced 2025-04-01 13:25:13 +08:00
Fix version update page (#2862)
* Binding closures only get the container instance as argument
This commit is contained in:
parent
ccc7a43913
commit
aa7ea1940f
@ -12,6 +12,7 @@ namespace Flarum\Update;
|
|||||||
use Flarum\Foundation\AbstractServiceProvider;
|
use Flarum\Foundation\AbstractServiceProvider;
|
||||||
use Flarum\Http\RouteCollection;
|
use Flarum\Http\RouteCollection;
|
||||||
use Flarum\Http\RouteHandlerFactory;
|
use Flarum\Http\RouteHandlerFactory;
|
||||||
|
use Illuminate\Contracts\Container\Container;
|
||||||
|
|
||||||
class UpdateServiceProvider extends AbstractServiceProvider
|
class UpdateServiceProvider extends AbstractServiceProvider
|
||||||
{
|
{
|
||||||
@ -20,9 +21,10 @@ class UpdateServiceProvider extends AbstractServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
$this->container->singleton('flarum.update.routes', function (RouteHandlerFactory $route) {
|
$this->container->singleton('flarum.update.routes', function (Container $container) {
|
||||||
$routes = new RouteCollection;
|
$routes = new RouteCollection;
|
||||||
$this->populateRoutes($routes, $route);
|
$factory = $container->make(RouteHandlerFactory::class);
|
||||||
|
$this->populateRoutes($routes, $factory);
|
||||||
|
|
||||||
return $routes;
|
return $routes;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user