I have a mySql query that I need to convert using Eloquent(recommended) if possible. Here is my query:
SELECT * FROM
( SELECT `uid`, `revision` FROM `tasks` ORDER BY `revision` DESC)
x GROUP by uid
In my Project
model I have the following:
$this->hasMany('\App\Task', 'project_id');
And now, How do I convert the sql query above using eloquent. Any help is appreciated.
Cheers all.