Use of artisan tinker for manual initialization

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:
Tom Croft 2022-10-11 15:20:10 +01:00 committed by GitHub
parent bfc1c4f513
commit 28e5ad9062
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.