Left join with last record of right table in Laravel & Mysql

Here we have 2 tables 'users' and 'answers' where users is left table and answers is right table which has user answers.

We wanted to left join users with answers but the join should be with the latest record or answers table.

 

Share This:

2 thoughts on “Left join with last record of right table in Laravel & Mysql

  1. Sandeep

    Excellent... It made my day... Got solution after lots of searching the answer for this particular problem on many portals.
    Thanks buddy...

Leave a Reply

Your email address will not be published. Required fields are marked *