how to get greatest number in database for laravel 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