Skip to content

Commit

Permalink
fix find method issue for return instanceof model when find data
Browse files Browse the repository at this point in the history
  • Loading branch information
BMTmohammedtaha committed Dec 12, 2023
1 parent 51e0194 commit 67a312a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ public static function find(int $id, array|string $columns = '*', ?DataRulesInte
$data = static::get($columns, fn ($query) => $query->where([$model->getKeyName() => $id]), $rules, $model);

if ($data->first() instanceof self) {
return $data;
return $data->first();
}
return null;
}
Expand Down

0 comments on commit 67a312a

Please sign in to comment.