protected function addApproved(Builder $builder)
    {
        $builder->macro('approved', function (Builder $builder) {
            $model = $builder->getModel();

            $this->remove($builder, $model);

            $builder->where($model->getQualifiedStatusColumn(), '=', Status::APPROVED);

            return $builder;
        });
    }
protected function addApproved(Builder $builder)
    {
        $builder->macro('approved', function (Builder $builder) {
            $model = $builder->getModel();

            $this->remove($builder, $model);

            $builder->where($model->getQualifiedStatusColumn(), '=', Status::APPROVED);

            return $builder;
        });
    }
protected function addApproved ( Builder $ builder ) { $ builder -> macro ( 'approved' , function ( Builder $ builder ) { $ model = $ builder -> getModel ( ) ; $ this -> remove ( $ builder , $ model ) ; $ builder -> where ( $ model -> getQualifiedStatusColumn ( ) , '=' , Status :: APPROVED ) ; return $ builder ; } ) ; }
Add the Approved extension to the builder.

@param  \Illuminate\Database\Eloquent\Builder $builder

@return void
Add the Approved extension to the builder .