Matheeus
"The model [App\Models\Team] does not have a relationship named [leads]." (Multi-tenant + Modules)
It depends on your necessities, in my case the extreme level of complexity that this combo adds to the developing of every module/part of the application was not such as to justify its use.
I opted for throwing out the multi-tenancy, by managing it at a server level using different laravel databases/envs, also because it's incompatible with many major Filament libraries like Shield (for permissions)
15 replies
"The model [App\Models\Team] does not have a relationship named [leads]." (Multi-tenant + Modules)
I can only suggest that, in my experience, laravel-modules works poorly together with multi-tenancy, probably the modules library isn't really made for this approach, as it hands very bad to handle the "change of context"
15 replies
"The model [App\Models\Team] does not have a relationship named [leads]." (Multi-tenant + Modules)
Unfortunately I didn't find any simple solution so I discarded the modular multi-tenant architecture.
Seems there's a way to achieve it but I didn't try to implement it, it needs the Reflector class that scans the Model folder and dynamically gets the Model names, but seems to be an approach that is not recommended by many developers, because it affects the performance of the Laravel framework
15 replies