Hootlex\Moderation\ModerationScope::addWithRejected PHP Method

addWithRejected() protected method

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