mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:44:04 +00:00
Fix redirect macro test
This commit is contained in:
parent
75f00a58dd
commit
665d222872
4 changed files with 11 additions and 8 deletions
|
|
@ -7,6 +7,7 @@ namespace Stancl\Tenancy;
|
|||
use Illuminate\Cache\CacheManager;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Stancl\Tenancy\TenancyBootstrappers\FilesystemTenancyBootstrapper;
|
||||
|
||||
class TenancyServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
@ -40,11 +41,9 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
\Stancl\Tenancy\Middleware\InitializeTenancy::class,
|
||||
]);
|
||||
|
||||
$this->app->instance('globalUrl', clone $this->app['url']);
|
||||
$this->app['url']->macro('setAssetRoot', function ($root) {
|
||||
$this->assetRoot = $root;
|
||||
|
||||
return $this;
|
||||
$this->app->singleton('globalUrl', function ($app) {
|
||||
$instance = clone $app['url'];
|
||||
$instance->setAssetRoot($app[FilesystemTenancyBootstrapper::class]->originalPaths['asset_url']);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue