mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 22:24:03 +00:00
wip
This commit is contained in:
parent
9520cbc811
commit
36afb7dbdd
4 changed files with 29 additions and 0 deletions
|
|
@ -10,6 +10,11 @@ use Stancl\Tenancy\Tenancy;
|
|||
|
||||
class CrossDomainRedirect implements Feature
|
||||
{
|
||||
public function __construct(protected Tenancy $tenancy)
|
||||
{
|
||||
dd($this->tenancy);
|
||||
}
|
||||
|
||||
public function bootstrap(Tenancy $tenancy): void
|
||||
{
|
||||
RedirectResponse::macro('domain', function (string $domain) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
return $tenancy;
|
||||
});
|
||||
|
||||
foreach ($this->app['config']['tenancy.tenant_unaware_features'] ?? [] as $feature) {
|
||||
$this->app[$feature]->bootstrap();
|
||||
}
|
||||
|
||||
// Make it possible to inject the current tenant by typehinting the Tenant contract.
|
||||
$this->app->bind(Tenant::class, function ($app) {
|
||||
return $app[Tenancy::class]->tenant;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue