本文整理汇总了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'));
}