當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Employee::count方法代碼示例

本文整理匯總了PHP中app\Employee::count方法的典型用法代碼示例。如果您正苦於以下問題:PHP Employee::count方法的具體用法?PHP Employee::count怎麽用?PHP Employee::count使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Employee的用法示例。


在下文中一共展示了Employee::count方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     $count = Employee::count();
     $countProj = Project::count();
     $data = Employee::all();
     $YourRole = "";
     if (count(Auth::user()) > 0) {
         $YourRole = Auth::user()->UserRoles->role;
     }
     $Role2 = $this->Role1;
     // Count Unconfirmed
     $cc = 0;
     foreach ($data as $da) {
         if ($da->confirm == 0) {
             $cc++;
         }
     }
     $countConf = $cc;
     // Count Confirmed
     $cc1 = 0;
     foreach ($data as $dat) {
         if ($dat->confirm == 1) {
             $cc1++;
         }
     }
     $countConfirmed = $cc1;
     View::share('countConf', $countConf);
     View::share('YourRole', $YourRole);
     View::share('countConfirmed', $countConfirmed);
     View::share('count', $count);
     View::share('countProj', $countProj);
 }
開發者ID:arisros,項目名稱:drope.mployee,代碼行數:32,代碼來源:Controller.php

示例2: home

 public function home()
 {
     $stats['employees'] = \App\Employee::count();
     $stats['assets'] = \App\Asset::count();
     $stats['users'] = \App\User::count();
     $stats['vendors'] = \App\Vendor::count();
     return View('pages.dashboard', compact('stats'));
 }
開發者ID:amolkattel,項目名稱:Asset-Mgnt-Project,代碼行數:8,代碼來源:PagesController.php

示例3: __construct

 public function __construct()
 {
     $count = Employee::count();
     $countProj = Project::count();
     $data = Employee::all();
     $DataEm = "";
     $YourRole = "";
     $undisplayRoleAcc = "";
     if (count(Auth::user()) > 0) {
         $YourRole = Auth::user()->UserRoles->role;
         if (Auth::user()->id_employees > 0) {
             $DataEm = Employee::where('id', Auth::user()->id_employees)->get();
         }
     }
     if ($YourRole == 11) {
         $undisplayRoleAcc = "undisplayRole";
     }
     $Role2 = $this->Role1;
     // Count Unconfirmed
     $cc = 0;
     foreach ($data as $da) {
         if ($da->confirm == 0) {
             $cc++;
         }
     }
     $countConf = $cc;
     // Count Confirmed
     $cc1 = 0;
     foreach ($data as $dat) {
         if ($dat->confirm == 1) {
             $cc1++;
         }
     }
     $countConfirmed = $cc1;
     View::share('countConf', $countConf);
     View::share('DataEm', $DataEm);
     View::share('undisplayRoleAcc', $undisplayRoleAcc);
     View::share('YourRole', $YourRole);
     View::share('countConfirmed', $countConfirmed);
     View::share('count', $count);
     View::share('countProj', $countProj);
 }
開發者ID:arisros,項目名稱:drope.mployee,代碼行數:42,代碼來源:Controller.php

示例4: totalEmployee

 public function totalEmployee()
 {
     $result = Employee::count();
     return $result;
 }
開發者ID:smartrahat,項目名稱:zamzam,代碼行數:5,代碼來源:PageRepository.php

示例5: 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);
 }
開發者ID:m-gamal,項目名稱:crm,代碼行數:5,代碼來源:DashboardController.php


注:本文中的app\Employee::count方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。