mardi 15 mars 2016

max(date) sql query in laravel 5.2

I just wonder how to use below MySQL query in laravel5.2 using eloquent.

SELECT MAX(date) AS "Last seen date" FROM instances WHERE ad_id =1

I have column date in instance table .

I would like to select the latest date from that table where ad_id =1



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire