hard delete soft deleted laravel code example
Example 1: 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();
Example 2: force delete soft delete laravel
Soft Delete : $user->delete();
Force Delete : $user->forceDelete();
Restore Soft Deleted Item : $user->restore();
Example 3: laravel restore soft delete
Post::withTrashed()->find($post_id)->restore();