Skip to content

pass array to where #200

@jonasfrey

Description

@jonasfrey

instead of
$query->where("post_id" , 1)->where("category_id" , 2);

i would like to

$query->where([
"post_id" => 1, 
"category_id" => 2
]);

Edit:

i extendet the code by myself:
src/Pixie/QueryBuilder/QueryBuilderHandler.php
between line 608 and 609 i inserted

        //if an array is given 
        if(is_array($key)){
            foreach($key as $key => $value){
                $cached = $this->where($key, $value);
            }
            return $cached;
        } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions