AP
Size: a a a
AP
AR
AR
Gt
Gt
ДК
AR
В
В
В
N
AP
В
AP
М
М
М
AK
SS
$items = Product::whereHas('_price', fn($q)=>$q->where('price', '>', 0))
->with(['_price'=>fn($q)=>$q->where('price', '>', 0),'sizes'])->get();
foreach($items as $item) {
dump($item->_price); //здесь выводит нормальный объект
foreach($item->sizes as $size) {
dump($item->_price); //здесь выводит NULL
}
}
AD