mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 00:04:03 +00:00
Add UrlTenancyBootstrapper
This commit is contained in:
parent
21d55ef472
commit
1b00f5f1ae
3 changed files with 49 additions and 1 deletions
|
|
@ -118,7 +118,20 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
/**
|
||||
* Example of CLI tenant URL root override:
|
||||
*
|
||||
* UrlTenancyBootstrapper::$rootUrlOverride = function (Tenant $tenant) {
|
||||
* $baseUrl = URL::to('/');
|
||||
* $scheme = str($baseUrl)->before('://') . '://';
|
||||
*
|
||||
* return str($baseUrl)
|
||||
* ->after($scheme)
|
||||
* ->prepend($tenant->getTenantKey() . '.')
|
||||
* ->prepend($scheme)
|
||||
* ->toString();
|
||||
*};
|
||||
*/
|
||||
}
|
||||
|
||||
public function boot()
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ return [
|
|||
Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper::class,
|
||||
Stancl\Tenancy\Bootstrappers\QueueTenancyBootstrapper::class,
|
||||
Stancl\Tenancy\Bootstrappers\BatchTenancyBootstrapper::class,
|
||||
// Stancl\Tenancy\Bootstrappers\UrlTenancyBootstrapper::class,
|
||||
// Stancl\Tenancy\Bootstrappers\MailTenancyBootstrapper::class, // Queueing mail requires using QueueTenancyBootstrapper with $forceRefresh set to true
|
||||
// Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper::class, // Note: phpredis is needed
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue