We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08d31f4 commit b129178Copy full SHA for b129178
src/Parser.php
@@ -203,12 +203,18 @@ public function parse($options, $multiple = false)
203
} else {
204
$identification = $options;
205
206
- if (is_numeric($identification)) {
207
- $this->query->where('id', $identification);
208
- } else if (is_array($identification)) {
+ if (is_array($identification)) {
209
foreach ($identification as $column => $value) {
210
$this->query->where($column, $value);
211
}
+ } else {
+ if($this->isEloquentBuilder) {
212
+ $primaryKey = $this->builder->getModel()->getQualifiedKeyName();
213
214
+ $primaryKey = $this->getQualifiedColumnName('id');
215
+ }
216
+
217
+ $this->query->where($primaryKey, $identification);
218
219
220
0 commit comments