Answers for "laravel trashed only"

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 with trashed

$flights = App\Flight::withTrashed()
                ->where('account_id', 1)
                ->get();
Posted by: Guest on April-08-2020

Browse Popular Code Answers by Language