src/Execution/Builder.php
public function apply($builder, array $args)
    {
        /*
         * Call the queryFilter for backwards compatibility
         * @deprecated
         */
        $this->queryFilter->filter($builder, $args);

        foreach ($args as $key => $value) {
            /** @var \Nuwave\Lighthouse\Support\Contracts\ArgBuilderDirective $builderDirective */
            if ($builderDirective = Arr::get($this->builderDirectives, $key)) {
                $builder = $builderDirective->handleBuilder($builder, $value);
            }
        }

        foreach ($this->scopes as $scope) {
            call_user_func([$builder, $scope], $args);
        }

        return $builder;
    }
public function apply($builder, array $args)
    {
        /*
         * Call the queryFilter for backwards compatibility
         * @deprecated
         */
        $this->queryFilter->filter($builder, $args);

        foreach ($args as $key => $value) {
            /** @var \Nuwave\Lighthouse\Support\Contracts\ArgBuilderDirective $builderDirective */
            if ($builderDirective = Arr::get($this->builderDirectives, $key)) {
                $builder = $builderDirective->handleBuilder($builder, $value);
            }
        }

        foreach ($this->scopes as $scope) {
            call_user_func([$builder, $scope], $args);
        }

        return $builder;
    }
public function apply ( $ builder , array $ args ) { /*
         * Call the queryFilter for backwards compatibility
         * @deprecated
         */ $ this -> queryFilter -> filter ( $ builder , $ args ) ; foreach ( $ args as $ key => $ value ) { /** @var \Nuwave\Lighthouse\Support\Contracts\ArgBuilderDirective $builderDirective */ if ( $ builderDirective = Arr :: get ( $ this -> builderDirectives , $ key ) ) { $ builder = $ builderDirective -> handleBuilder ( $ builder , $ value ) ; } } foreach ( $ this -> scopes as $ scope ) { call_user_func ( [ $ builder , $ scope ] , $ args ) ; } return $ builder ; }
Apply the bound QueryBuilderDirectives to the given builder.

@param  \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder  $builder
@param  mixed[]  $args
@return  \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder
Apply the bound QueryBuilderDirectives to the given builder .