Kolekcja Laravel otrzymuje ostatni klucz tablicy
$collection->keys()->last()
Shadow
$collection->keys()->last()
$collection = collect(['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3']);
dd($collection->reverse()->keys()->first());