SQLSTATE[42S02] Error - Multi Tenancy
I'm trying to figure out multi tenancy, have ran through a couple docs / youtube videos and getting the following error:
I have an academies table, but no academy_user - I'm not sure what this is, surely that should just be user? Appreciate any help on this as I'm a bit out my depth.
Solution:Jump to solution
Found the problem, posting here for future search of anyone having the same. May seem a simple one, but I didn't see anywhere in the docs where this was a step hence my struggling:
5 Replies
Based on the information given it's hard to tell. Maybe share the error via Flare as mentioned in #✅┊rules. When is the error happening? On every page load?
Solution
Found the problem, posting here for future search of anyone having the same. May seem a simple one, but I didn't see anywhere in the docs where this was a step hence my struggling:
SOLUTION: Many to many relationship between user and tenant so requires an additional table. Created a migration for academy_user and a couple of columns for these IDs:
This is some Laravel stuff. That's why you won't find it in our docs, but in Laravel's
That makes sense, but as I say a bit out my depth so sometimes even knowing where to look is something