0
Assuming the eloquent model name is Sale, you need to sort by the datetime_write field in descending order and group by vehicle_id
Venda::ordeyBy('datetime_write', 'desc')->groupBy('vehicle_id')->get();
0
1
Assuming the eloquent model name is Sale, you need to sort by the datetime_write field in descending order and group by vehicle_id
Venda::ordeyBy('datetime_write', 'desc')->groupBy('vehicle_id')->get();
Browser other questions tagged laravel laravel-eloquent
You are not signed in. Login or sign up in order to post.