Laravel 5.5 Custom Soft Deletes on Model
问题 My posts are defined as soft deleted or not via the value in the status column, where: 0 = unavailable, 1 = available, and 77 = soft deleted. Currently, I add a global scope in the model to make sure I don't return soft-deleted posts: protected static function boot() { parent::boot(); static::addGlobalScope('status', function (Builder $builder) { $builder->where('status', '!=', '77'); }); } How would I modify softDelete (laravels built-in functionality) of a model from its default of