Answers for "laravel soft deleted"

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
1

larave Soft Deletes

Schema::table('flights', function (Blueprint $table) {
    $table->softDeletes();
});
Posted by: Guest on June-12-2020
0

laravel soft delete

$flights = Flight::where('active', 1)
               ->orderBy('name')
               ->take(10)
               ->get();
Posted by: Guest on January-14-2021

Code answers related to "laravel soft deleted"

Browse Popular Code Answers by Language