laravel中软删除字段deleted_at修改

我们知道laravel软删除的功能很好用

model软删除字段名修改

```

use Illuminate\Database\Eloquent\Builder;
    public static function bootSoftDeletes()
    {
        static::addGlobalScope('delete_time', function (Builder $builder) {
            $builder->where(self::$_table . '.delete_time', 0);
        });
    }
```

    A+
发布日期:2022年09月06日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: