max find from array in laravel orm code example
Example: laravel fetch max value
Cliente::max('id')
or
$maxValue = Cliente::orderBy('id', 'desc')->value('id'); // gets only the id
Cliente::max('id')
or
$maxValue = Cliente::orderBy('id', 'desc')->value('id'); // gets only the id