Support the ongoing development of →
Database Eloquent Queues
Last updated 1 year ago.

When user logged in company_id has been set.


i don't think there's is any eloquent way to solve this. You may however create a new model UserCompanyPermission, then define relationship to and from that model on other models. Then use Larave's hasManyThrough relationship to achieve what you need.


Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 - All rights reserved.