本文整理匯總了PHP中app\Order::whereStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP Order::whereStatus方法的具體用法?PHP Order::whereStatus怎麽用?PHP Order::whereStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Order
的用法示例。
在下文中一共展示了Order::whereStatus方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getDeclined
public function getDeclined()
{
$orders = Order::whereStatus(-1)->get();
$pageData = self::orderPageData('pending', 1, 1, 1, 0);
$pageData['table'] = $orders;
return view('panel.orders', $pageData);
}
示例2: __construct
public function __construct()
{
// Глобальная перменная для шаблона - залогиненный пользователь
view()->share('auser', Auth::user());
// Количество новых заказов
view()->share('newOrdersCount', Order::whereStatus(1)->count());
}
示例3: index
/**
* Show the application dashboard.
*
* @return Response
*/
public function index()
{
$private = Order::whereRaw('(status = 1 OR status = 2) AND prio = 0')->orderBy('order_id', 'desc')->whereHas("customer", function ($query) {
$query->where("business", "=", '0');
})->get();
$company = Order::whereRaw('(status = 1 OR status = 2) AND prio = 0')->orderBy('order_id', 'desc')->whereHas("customer", function ($query) {
$query->where("business", "=", '1');
})->get();
$prio = Order::where('prio', '=', '1')->whereRaw('(status = 1 OR status = 2)')->orderBy('order_id')->with("customer")->get();
$finished = Order::whereStatus('4')->with('customer')->get();
return view('home', compact('private', 'company', 'prio', 'finished'));
}