Support the ongoing development of Laravel.io →
Database Eloquent Queues
Last updated 4 months ago.
0

When user logged in company_id has been set.

0

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.

0

Sign in to participate in this thread!

LoadForge

Your banner here too?

Moderators

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.

© 2022 Laravel.io - All rights reserved.