public function register()
{
$this->app->bind('xe.storage.temp', function ($app) {
return new TempFileCreator();
}, true);
$this->app->bind('xe.storage', function ($app) {
$distributor = new RoundRobinDistributor($app['config']['filesystems'], $app['xe.db']->connection());
$proxyClass = $app['xe.interception']->proxy(Storage::class, 'XeStorage');
return new $proxyClass(new FilesystemHandler($app['filesystem'], $distributor), $app['xe.auth'], $app['xe.keygen'], $distributor, $app['xe.storage.temp']);
}, true);
$this->app->bind(Storage::class, 'xe.storage');
$this->app->bind('xe.storage.url', function ($app) {
return new UrlMaker($app['Illuminate\\Contracts\\Routing\\UrlGenerator'], $app['config']['filesystems.disks']);
}, true);
intercept('XeSettings@getManageMenu', ['storage.managemenu' => ['before' => 'manage.sort']], function ($target) {
$menu = $target();
$menu['contents']['submenu']['file'] = ['title' => '파일', 'description' => 'blur blur~', 'link' => '/manage/storage'];
return $menu;
});
}