Closed justinatack closed 7 years ago
This package only handle "Database/Schema Migration", you need to handle any Eloquent custom queries on your own.
ThIs issue is not really related to a "custom" eloquent query. I don't think you read the issue properly.
The basic issue is "How do I get the correct users table". How does Tenanti switch to use the correct tenant tables according to the logged in user?
When you go with multi-tenant on single database, it does requires "custom" eloquent query, there no going around it with what Laravel is offering at the moment.
Hello
I'm testing out Tenanti and I have successfully installed it, each time I create a new Tenant (Company) it runs the migrations just fine. The issue is I get an error when trying to load in related data using the with key.
I'm using a single database with tenant prefixed tables The tables in my database are as follows ...
Here is the route and query ...
The error I get is ...
I can see where the error is. The table name is incorrect, it should be ...
I think I'm missing something ...
What should be in the middleware or attached to the query to make it scope correctly?