mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Use singleton method
This commit is contained in:
parent
8c53a93d43
commit
b65d18ee7f
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user