Answers for "soft deleted laravel query"

PHP
2

get soft deleted data laravel

To also get soft deleted models : 

$trashedAndNotTrashed = Model::withTrashed()->get();

Only soft deleted models in your results : 

$onlySoftDeleted = Model::onlyTrashed()->get();
Posted by: Guest on November-28-2020
0

Laravel eloquent query soft delete

use App\Models\Flight;

$flights = Flight::withTrashed()
                ->where('account_id', 1)
                ->get();
Posted by: Guest on July-24-2021

Code answers related to "soft deleted laravel query"

Browse Popular Code Answers by Language