Here is the attached image to show what I'm asking for?
In the CheckedIn model, I want to get the data that belong to the foreign key called checkInUserID.
Here is the attached image to show what I'm asking for?
In the CheckedIn model, I want to get the data that belong to the foreign key called checkInUserID.
You have to create a relationship between the two tables in your Modal. This will let you directly access all the values that are in relation to that particular Modal.
To know how it works check out Eloquent-Relationships
You can also check out this tutorial Laracast-Foreign-Keys (Highly recommended for understanding)