eloquent get all but not last code example Example: laravel get last record return DB::table('files')->order_by('upload_time', 'desc')->first();