Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Eloquent ORMでこれに対する解決策はありますか?
私は親識別子を持つ配列を持っています:
Array ( [0] => 87, [1] => 65, ... )
そして、parent_id列=配列内の任意のIDであるテーブルPRODUCTSを選択したい
流暢:
DB::table('PRODUCTS')->whereIn('parent_id', $parent_ids)->get();
雄弁:
Product::whereIn('parent_id', $parent_ids)->get();