Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel get unique data by column and order by

$devices = Device::orderByDesc('last_updated_at')->get()->unique('serial_no');
$devices->values()->all();
Comment

PREVIOUS NEXT
Code Example
::  
Php ::  
::  
Php ::  
::  
Php ::  
::  
::  
::  
Php ::  
:: hasmany relationship in laravel 
::  
::  
Php ::  
::  
::  
Php ::  
::  
:: session in laravel 
Php ::  
Php :: bool value of blank string inp php 
Php :: server.php not found 
Php ::  
Php :: jquery get data from php 
::  
:: array filter php get first object 
:: doctrine where 
Php ::  
::  
Php ::  
ADD CONTENT
Topic
Content
Source link
Name
1+8 =