eloquent using last()
snippet in php

laravel get last record

user1269

Model::latest()->first();

eloquent using last()

user7023

Model::latest()->first();

laravel get last record

user4848

return DB::table('files')->order_by('upload_time', 'desc')->first();