I am using Laravel 4.2 and have a table called users and a column in that table labeled name. I also have a transactions table that has 2 columns which are both foreign keys that reference the primary key of the users table. One of the rows in the transactions is labeled given_to and the other is labeled received_from. How can I access the name associated with the given_to user id from the transactions table using Eloquent? I tried the following in a view and received a trying to get property of non-object error:
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.