I'm wondering if there is an eloquent method which I can pass the where method an array. For example
I have an array of query params like so:
[
"limit" => "4"
"is_completed" => "true"
"status" => 1
]
So I can just pass in:
$this->model->whereArray($queryParams)->get();
and that whereArray method just loops through each query param and would do something similar to this:
foreach($queryParam as $param => $key)
{
$this->where($param, '=', $key);
return $this;
}