Flarum\Core\Post\RegisteredTypesScope::remove PHP Method

remove() public method

Remove the scope from the given Eloquent query builder.
public remove ( Builder $builder, Model $post ) : void
$builder Illuminate\Database\Eloquent\Builder
$post Illuminate\Database\Eloquent\Model
return void
    public function remove(Builder $builder, Model $post)
    {
        $query = $builder->getQuery();
        unset($query->wheres[$this->whereIndex]);
        $query->wheres = array_values($query->wheres);
        $whereBindings = $query->getRawBindings()['where'];
        array_splice($whereBindings, $this->bindingIndex, $this->bindingCount);
        $query->setBindings(array_values($whereBindings));
    }
RegisteredTypesScope