feat: config

This commit is contained in:
2025-03-23 19:07:29 +08:00
parent ca57f795ba
commit 87a5b2f9e1
5 changed files with 52 additions and 3 deletions

View File

@@ -86,4 +86,20 @@ class Spu extends Model
->select(['id','cycle_id','chef_id','title','title','sub_title','category_id'])
->get();
}
/**
* @param array $ids
* @return array
*/
public function getDataArrByIds(array $ids): array
{
$res = $this
->whereIn('id',$ids)
->orderBy('sort')
->get();
if ($res->isEmpty()) return [];
return $res->toArray();
}
}