Integration with Tenancy for Laravel — stancl/tenancy #23
daniplaninc
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to use it with Tenancy for Laravel package, and out of the box it works fine for landlord app, but not for tenant, since the login request has to pass through the tenant initialization middleware.
My use case is that I want to use login link for both the landlord and the tenant apps. If you only need to use it for landlord, it works fine out of the box. If you only need to use it for tenant, you can probably achieve it by adding the appropriate middleware to the middleware config.
I resolved it by adding a custom route for the tenant, and by using a form to post the request, instead of the provided livewire component.
relevant code from routes/tenant.php
And the HTML form I used instead of the provided livewire component:
Hopefully I can save someone some time :)
Thank you spatie for creating and sharing amazing packages!
Beta Was this translation helpful? Give feedback.
All reactions