当前位置: 首页>>代码示例>>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;未经允许,请勿转载。