如果可行:
$offer::(‘Information’)->prices()->personal(1)->max(‘price’);
这可行:
$offer::(‘Information’)->prices()->personal(1)->min(‘price’);
没有办法以某种方式将它们组合起来,例如:
$offer::(‘Information’)->prices()->personal(1)->max(‘price’)->as('max_personal_price')->prices()->personal(1)->min(‘price’)->as('min_personal_price');
只需要调用一个查询就可以获取所有可用信息:
{
"id": 1,
"name": "test",
"max_personal_price": 1234.50,
"min_personal_price": 345.40,
"information": {
"type": 3,
"status": 1
}
}