return table except deleted_at (softdeletes) laravel

you are using query builder (facade DB) in this case you should do this:

DB::table('mail_recipients')->where('meo_id', '=', $ meoId)->whereNull('deleted_at')->select('name', 'email')->get();

If you use the model, you must use the SoftDeletes trait

class Flight extends Model{
 use SoftDeletes;
}

see more in the documentation https://laravel.com/docs/8.x/eloquent#soft-deleting

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top