public function apply(Builder $builder)
    {
        $this->builder = $builder;

        // We need to select all columns from the original
        // table, since many joins can mess up the selected fields
        $this->builder->select("{$this->getTableName()}.*");

        foreach ($this->filters() as $name => $value) {
            $this->callFilterMethod($name, $value);
        }

        return $this->builder;
    }
public function apply(Builder $builder)
    {
        $this->builder = $builder;

        // We need to select all columns from the original
        // table, since many joins can mess up the selected fields
        $this->builder->select("{$this->getTableName()}.*");

        foreach ($this->filters() as $name => $value) {
            $this->callFilterMethod($name, $value);
        }

        return $this->builder;
    }
public function apply ( Builder $ builder ) { $ this -> builder = $ builder ; // We need to select all columns from the original // table, since many joins can mess up the selected fields $ this -> builder -> select ( "{$this->getTableName()}.*" ) ; foreach ( $ this -> filters ( ) as $ name => $ value ) { $ this -> callFilterMethod ( $ name , $ value ) ; } return $ this -> builder ; }
Applies all available filters.

@param  \Illuminate\Database\Eloquent\Builder  $builder
@return \Illuminate\Database\Eloquent\Builder
Applies all available filters .