New to multi-tenancy? Let's build single database multi-tenancy into Laravel from scratch.
great but leran how to add a domain for eche company
This is a great course but my only issue is the use of session for storing the current tenant. The reason for this is that you can't have different tenants open in different tabs. Use of the session also limits the ability to create a REST or stateless api. I don't think there is a way around this and the tenant ID in the needed in the url always - basecamp api does this with account id - https://github.com/basecamp/bc3-api.
Other than that the rest of the course is awesome and has helped with a current project.
My only question is with the notes above, is the only way to achieve the session-less solution is to remove the session call in the middleware and to include the tenant id in all of the routes and controller actions?
If you want this to be used for a stateless API, and still follow the same principles, perhaps look at utilising Redis Cache over sessions? That is the best way I can think of, unless you want to push this over to a custom Header variable instead. It all depends on use case.
Why would you want different tenants open in different tabs? You can always open an incognito window.
No resources needed for this course.
No links have been added to this course.
No transcript available for Introduction right now. You can request them to be added.