Tenancy
class Tenancy (View source)
Traits
Macroable
Properties
Tenant|Model|null | $tenant | ||
callable|null | $getBootstrappersUsing | ||
bool | $initialized |
Methods
void
void
end()
No description
array
getBootstrappers()
No description
Builder
query()
No description
Tenant|null
find($id)
No description
mixed
central(callable $callback)
Run a callback in the central context.
void
runForMultiple(Tenant[]|Traversable|string[]|null $tenants, callable $callback)
Run a callback for multiple tenants.
Details
void
initialize(Tenant|int|string $tenant)
Initializes the tenant.
void
end()
No description
array
getBootstrappers()
No description
Builder
query()
No description
Tenant|Model
model()
No description
Tenant|null
find($id)
No description
mixed
central(callable $callback)
Run a callback in the central context.
Atomic, safely reverts to previous context.
void
runForMultiple(Tenant[]|Traversable|string[]|null $tenants, callable $callback)
Run a callback for multiple tenants.
More performant than running $tenant->run() one by one.