Skip to content
Advertisement

Select the distinct latest records based on their creation date

How can I select, preferably using eloquent laravel’s query builder, the latest distinct records from a table.

I have tried this query without success.

JavaScript

Advertisement

Answer

The solution was to use

JavaScript

This ensured that the distinct returned only the unique latest record of each value.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement