本文整理汇总了PHP中app\Customer::count方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::count方法的具体用法?PHP Customer::count怎么用?PHP Customer::count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Customer
的用法示例。
在下文中一共展示了Customer::count方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Show the application dashboard to the user.
*
* @return Response
*/
public function index()
{
$items = Item::where('type', 1)->count();
$item_kits = Item::where('type', 2)->count();
$customers = Customer::count();
$suppliers = Supplier::count();
$receivings = Receiving::count();
$sales = Sale::count();
$employees = User::count();
return view('home')->with('items', $items)->with('item_kits', $item_kits)->with('customers', $customers)->with('suppliers', $suppliers)->with('receivings', $receivings)->with('sales', $sales)->with('employees', $employees);
}
示例2: index
public function index()
{
$dataView = ['productsCount' => Product::count(), 'plansCount' => Plan::where('month', \Config::get('app.current_month'))->count(), 'reportsCount' => Report::where('month', \Config::get('app.current_month'))->count(), 'customersCount' => Customer::count(), 'employeesCount' => Employee::count()];
return view('admin.index', $dataView);
}