Use singleton method

This commit is contained in:
Franz Liedke 2015-06-09 02:51:20 +02:00
parent 8c53a93d43
commit b65d18ee7f

View File

@ -30,8 +30,8 @@ class AdminServiceProvider extends ServiceProvider
*/
public function register()
{
$this->app['flarum.admin.assetManager'] = $this->app->share(function ($app) {
return new AssetManager($app['files'], $app['path.public'].'/assets', 'admin');
$this->app->singleton('flarum.admin.assetManager', function () {
return new AssetManager($this->app->make('files'), public_path('assets'), 'admin');
});
}
}