laravel eloquent not get that records which have status true in relation table last row code example
Example 1: laravel get last record
Model::latest()->first();
Example 2: laravel get last record
return DB::table('files')->order_by('upload_time', 'desc')->first();