diff --git a/src/Helpers/Framework.php b/src/Helpers/Framework.php index cc15ece..ac537ee 100644 --- a/src/Helpers/Framework.php +++ b/src/Helpers/Framework.php @@ -83,7 +83,9 @@ public function getByCode(Model | string $model, string $code) if (! Schema::hasColumn($model::query()->getModel()->getTable(), 'code')) { return null; } - + if (is_array($code)) { + return $model::query()->whereIn('code', $code)->get(); + } return $model::query()->where('code', '=', trim($code))->first(); }