mirror of
https://github.com/flarum/core.git
synced 2025-10-18 18:26:07 +02:00
Rename app
to container (#2609)
* Rename `app` helper to `resolve`, deprecate old version * Rename $this->app to $this->container in service providers We no longer couple Flarum\Foundation\Application to the Laravel container; instead, we use the container separately. Changing our naming to reflect that will make things clearer.
This commit is contained in:
committed by
GitHub
parent
15cbe4daaa
commit
c81f629b0b
@@ -20,7 +20,7 @@ class InstallServiceProvider extends AbstractServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton('flarum.install.routes', function () {
|
||||
$this->container->singleton('flarum.install.routes', function () {
|
||||
return new RouteCollection;
|
||||
});
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class InstallServiceProvider extends AbstractServiceProvider
|
||||
{
|
||||
$this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.install');
|
||||
|
||||
$this->populateRoutes($this->app->make('flarum.install.routes'));
|
||||
$this->populateRoutes($this->container->make('flarum.install.routes'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ class InstallServiceProvider extends AbstractServiceProvider
|
||||
*/
|
||||
protected function populateRoutes(RouteCollection $routes)
|
||||
{
|
||||
$route = $this->app->make(RouteHandlerFactory::class);
|
||||
$route = $this->container->make(RouteHandlerFactory::class);
|
||||
|
||||
$routes->get(
|
||||
'/{path:.*}',
|
||||
|
Reference in New Issue
Block a user