I would do it the other way. Go in from the platform side of the relationship because that is the thing you are searching against.
$platform = Platform::with('user')->where('platform_id', 1)->first(); foreach($platform->users as $user) { echo "username: $user->username , pivot value: $user->pivot->some_value"; }
assuming you have the relationship setup in the Platform model.
might work
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community