public function remove(Builder $builder, Model $model)
{
$column = $model->getQualifiedStatusColumn();
$query = $builder->getQuery();
$bindingKey = 0;
foreach ((array) $query->wheres as $key => $where) {
if ($this->isModerationConstraint($where, $column)) {
$this->removeWhere($query, $key);
// Here SoftDeletingScope simply removes the where
// but since we use Basic where (not Null type)
// we need to get rid of the binding as well
$this->removeBinding($query, $bindingKey);
}
// Check if where is either NULL or NOT NULL type,
// if that's the case, don't increment the key
// since there is no binding for these types
if (!in_array($where['type'], ['Null', 'NotNull'])) {
$bindingKey++;
}
}
}