feat: config
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user