【发布时间】:2013-01-14 22:17:52
【问题描述】:
public function action_detail($orderId)
{
$customerWithOrderDetails = Customer::with(array('order' => function($query)
{ global $orderId;
$query->where('id', '=', $orderId);
}, 'order.orderdetail', 'order.attachment'))->find(Auth::user()->id);
return var_dump($customerWithOrderDetails);
}
我收到“变量未定义”错误。为什么?
【问题讨论】: