public function scopePimp(Builder $builder, $query = [], $sort = [], $relations = [])
    {
        $query = $query ?: array_except(Input::all(), [$this->sortParameterName, $this->withParameterName]);
        $builder->filtered($query)->sorted($sort)->withRelations($relations);
    }
public function scopePimp(Builder $builder, $query = [], $sort = [], $relations = [])
    {
        $query = $query ?: array_except(Input::all(), [$this->sortParameterName, $this->withParameterName]);
        $builder->filtered($query)->sorted($sort)->withRelations($relations);
    }
public function scopePimp ( Builder $ builder , $ query = [ ] , $ sort = [ ] , $ relations = [ ] ) { $ query = $ query ? : array_except ( Input :: all ( ) , [ $ this -> sortParameterName , $ this -> withParameterName ] ) ; $ builder -> filtered ( $ query ) -> sorted ( $ sort ) -> withRelations ( $ relations ) ; }
Enable searchable, sortable and withable scopes

@param Builder $builder query builder
@param array $query
Enable searchable sortable and withable scopes