Skip to content

Commit

Permalink
feature: add whereIn method
Browse files Browse the repository at this point in the history
  • Loading branch information
esbenp committed Dec 24, 2015
1 parent 300c994 commit 441a389
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,22 @@ public function getWhereArray(array $clauses, array $options = [])
return $query->get();
}

/**
* Get resources where a column value exists in array
* @param string $column
* @param array $values
* @param array $options
* @return Collection
*/
public function getWhereIn($column, array $values, array $options = [])
{
$query = $this->createBaseBuilder($options);

$query->whereIn($column, $values);

return $query->get();
}

/**
* Delete a resource by its primary key
* @param mixed $id
Expand Down

0 comments on commit 441a389

Please sign in to comment.