作者:mobiledu2502891023 | 来源:互联网 | 2023-09-24 12:27
Returns a subset of N element from a stored array
Collection::where("field", "value")->slice("arrayField", 3)->get();
Implemented only for "Normal query"
该提问来源于开源项目:jenssegers/laravel-mongodb
it should be:
1 2
| php
Categories::find('t3')->slice('sub_categories', [ 6, 3 ] ) |