Closed g-psantos closed 8 years ago
I figured out from looking at other issues in the project that each model has to be configured with a protected $tenantColumns
array or, alternatively, a default must be set by publishing the component's configuration file. I hadn't published that file and was unaware of the need to set that variable in each model, which is why it wasn't working.
I'd suggest adding this step to the documentation.
I installed and configured Landlord, and created a route to test if it was working. The use case is very simple: I have a User model and an Account model, where a User can have multiple Accounts. The Accounts table has a "user_id", and the Eloquent relationship is defined in both models as well.
When I access that route, I'm still getting the accounts for all the users. Debugbar shows the SQL query:
Any ideas on what's missing?