I have a many to many relationship setup with 3 tables... Call, User, and Call_User as the pivot table. I have added additional columns called status_id in the pivot table with the hopes that I could access the Status model via that new column, but I cannot figure out how to do an eloquent relationship off the pivot table.
I am able to get the pivot table object, but I cannot figure out how to get to the relationship of that additional column on the pivot table...
@foreach($call->users as $user)
$user->pivot
@endforeach
$user->pivot gives the the row I am looking for in the Call_User table, but I want to then get to the Status model via that status_id of the Call_User pivot table.
I tried the below, but it just returns null...
@foreach($call->users as $user)
$user->pivot->status
@endforeach
Is it possible to access a model off of a pivot table with an eloquent relationship?