本文整理匯總了PHP中app\Order::whereOrder_id方法的典型用法代碼示例。如果您正苦於以下問題:PHP Order::whereOrder_id方法的具體用法?PHP Order::whereOrder_id怎麽用?PHP Order::whereOrder_id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Order
的用法示例。
在下文中一共展示了Order::whereOrder_id方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exists
/**
* Returnerar true eller false beroende på om order existerar
* @param $order_id
* @return boolean
*/
public static function exists($id)
{
return Order::whereOrder_id($id)->first() ? true : false;
}
示例2: getEvent
public function getEvent($id)
{
$order = Order::whereOrder_id($id)->first();
$event = Event::whereOrder_id($id)->first();
return ['order' => $order, 'customer' => $order->customer()->first(), 'event' => $event];
}
示例3: comment
public function comment(Request $request)
{
$order = Order::whereOrder_id($request->order_id)->first();
if ($request->finished) {
$order->finishIt($request->comment, $request->sign);
} else {
$order->commentIt($request->comment, $request->sign);
}
$event = $order->events()->orderBy('order_event_id', 'desc')->first();
return ["event" => $event, "business" => $order->customer()->first()->business, "status" => $order->status, "prio" => $order->prio];
}