1
0
mirror of https://github.com/flarum/core.git synced 2025-07-19 07:41:22 +02:00

Make ExtensionManager a singleton

This commit is contained in:
Toby Zerner
2018-06-15 19:25:15 +09:30
parent d13229a1fd
commit 14d49c2063

View File

@@ -21,7 +21,8 @@ class ExtensionServiceProvider extends AbstractServiceProvider
*/
public function register()
{
$this->app->bind('flarum.extensions', ExtensionManager::class);
$this->app->singleton(ExtensionManager::class);
$this->app->alias(ExtensionManager::class, 'flarum.extensions');
$this->app->booting(function (Container $app) {
$app->make('flarum.extensions')->extend($app);