laravel fetch max value

31

Cliente::max('id')
  
  or
  
$maxValue = Cliente::orderBy('id', 'desc')->value('id'); // gets only the id  

Comments

Submit
0 Comments