1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:14:04 +00:00

asset() tenancy

This commit is contained in:
Samuel Štancl 2019-09-21 16:06:08 +02:00
parent cf71fa5979
commit 6134c8113b
5 changed files with 27 additions and 7 deletions

View file

@ -40,7 +40,12 @@ class TenancyServiceProvider extends ServiceProvider
\Stancl\Tenancy\Middleware\InitializeTenancy::class,
]);
$this->app->register(TenantRouteServiceProvider::class);
$this->app->instance('globalUrl', clone $this->app['url']);
$this->app['url']->macro('setAssetRoot', function ($root) {
$this->assetRoot = $root;
return $this;
});
}
/**
@ -79,5 +84,7 @@ class TenancyServiceProvider extends ServiceProvider
$this->app->bind('globalCache', function ($app) {
return new CacheManager($app);
});
$this->app->register(TenantRouteServiceProvider::class);
}
}