📜  laravel wherin softdelete - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:07.730000             🧑  作者: Mango

代码示例1
ModelName::whereIn('id', [array of ids])
           ->update(['deleted_at' => now()]);

DB::table('table_name')->whereIn('id', [array of ids])
            ->update([
                'deleted_at' => now()
            ]);