Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel get unique data by column and order by

$devices = Device::orderByDesc('last_updated_at')->get()->unique('serial_no');
$devices->values()->all();
 
PREVIOUS NEXT
Tagged: #laravel #unique #data #column #order
ADD COMMENT
Topic
Name
7+4 =