I have a User model, who will add Clients, who will have PermanentAddress (id in the clients table to reference their addresses) which will have Divisions which will have Districts and lastly which will have many Subdistricts.
Tables like so with hasMany and belongsTo relationships-
- Users
- Clients
- PermanentAddresses (keeping the IDs of the subsequent child areas and client_id)
- Divisions
- Districts
- Subdistricts
How do I get all the clients from a specific Subdistricts who will belongsTo Districts and so on all the way to Clients.
All these levels are driving the eloquent/join queries nuts. Some clue will be much appreciated. This HasMany Deep Relationship has the same but no answer to achieve this without using a package. The situation is similar though.