title: join 2 tables in laravel
body: <p>I’m new to Laravel5 and even if I’ve made some progress with my site, I’m stuck in something that may be simple for you.
  I have 2 tables: Users and Books</p>
  
  <p>Users:</p>
  
  <pre><code>UserID|FirstName|LastName
  1|John|Doe
  2|Mark|Lehman
  3|Dan|Edward
  </code></pre>
  
  <p>Books: (it means that the user with the ID of UserID has read the book with the ID of BookID</p>
  
  <pre><code>BookID|UserID
  1|1
  1|2
  </code></pre>
  
  <p>I want to find first name and last name of all the users who read the book with the id of 1 (I’m passing this id to a function, finduser($id))
  In the above example finduser(1) should return:
  John Doe
  Mark Lehman</p>
  
  <p>(i think in php is something like: select (FirstName, LastName) from Users join Books on (Users.ID=Books.userID). </p>
  
  <p>I created the function finduser($id) in helpers.php not in a controller. I call this function into a view. I'm also interested in how i call the returns of this function into the view an how I echo them out...</p>
  
  <p>Can you help me, please?</p>