Hootlex\Moderation\ModerationScope::addWithPending PHP Method

addWithPending() protected method

Add the with-pending extension to the builder.
protected addWithPending ( Builder $builder ) : void
$builder Illuminate\Database\Eloquent\Builder
return void
    protected function addWithPending(Builder $builder)
    {
        $builder->macro('withPending', function (Builder $builder) {
            $this->remove($builder, $builder->getModel());
            return $builder->whereIN($this->getStatusColumn($builder), [Status::APPROVED, Status::PENDING]);
        });
    }