本文整理汇总了PHP中Audit::orderBy方法的典型用法代码示例。如果您正苦于以下问题:PHP Audit::orderBy方法的具体用法?PHP Audit::orderBy怎么用?PHP Audit::orderBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Audit
的用法示例。
在下文中一共展示了Audit::orderBy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Return the list of items on the main page
*
* @return items
*/
protected function index()
{
//enabled Voice Command by default
Session::put('VC', 'enabled');
//get the first most recent 10 logs
$logs = Audit::orderBy('id', 'desc')->take(10)->get();
$low_stocks = Ingredient::selectRaw("fposs_ingredients.name,fposs_suppliers.name as supp,\n\t\t\t\t\tfposs_suppliers.resource_person,fposs_ingredients.stocks,\n\t\t\t\t\tfposs_ingredients.alert_level,fposs_ingredients.shipment_unit")->where('stocks', '<=', 'alert_level')->leftJoin('fposs_suppliers', 'fposs_ingredients.supplier_id', '=', 'fposs_suppliers.id')->get();
// $low_stocks = DB::table('fposs_ingredients')->where('stocks', '<', 'alert_level')->count();
$items = $this->production_item->getCurrentProduction();
return View::make('index')->with('title', "Flibbys Point of Sale System")->with('items', $items)->with('ingredients', $low_stocks)->with('logs', $logs);
}