min and max in laravel eloquent 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