ModelName::whereIn('id', [array of ids])
->update(['deleted_at' => now()]);
DB::table('table_name')->whereIn('id', [array of ids])
->update([
'deleted_at' => now()
]);
class Clientes extends Model{ use SoftDeletes; protected $dates = ['deleted_at'];}
Namespace: use IlluminateDatabaseEloquentSoftDeletes; ->in modal
Invoking : use SoftDeletes; -> in modal
php artisan make:migration add_deleted_at_to_contacts_table
Creating a softdelete column : $table->softDeletes(); -> add_deleted_at_to_contacts_table.php
Other Important function
withTashed()->delete or nonDelete(for restore method and forcDelete method)
onlyTrashed()->delete(for view)
restore()
forceDelete()