mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Use of artisan tinker for manual initialization (#219)
Small change but it took a bit for me to figure this one out so I wanted to mention it
This commit is contained in:
parent
bfc1c4f513
commit
df4a487663
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ section: content
|
||||||
|
|
||||||
# Manual initialization {#manual-initialization}
|
# Manual initialization {#manual-initialization}
|
||||||
|
|
||||||
Sometimes you may want to initialize tenancy manually — that is, not using web middleware, command traits, queue tenancy etc.
|
Sometimes you may want to initialize tenancy manually — that is, not using web middleware, command traits, queue tenancy etc. A common use case for this is if you need to use `artisan tinker` for a specific tenant.
|
||||||
|
|
||||||
For that, use the `initialize()` method on `Stancl\Tenancy\Tenancy`. You can resolve the `Tenancy` instance out of the container using the `tenancy()` helper.
|
For that, use the `initialize()` method on `Stancl\Tenancy\Tenancy`. You can resolve the `Tenancy` instance out of the container using the `tenancy()` helper.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue