当前位置: 首页>>代码示例>>PHP>>正文


PHP Employee::yourManagers方法代码示例

本文整理汇总了PHP中app\Employee::yourManagers方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::yourManagers方法的具体用法?PHP Employee::yourManagers怎么用?PHP Employee::yourManagers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Employee的用法示例。


在下文中一共展示了Employee::yourManagers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: single

 public function single($mr, $currentMonth)
 {
     $actualVisits = [];
     $MonthlyCustomerProducts = [];
     $MRLine = [];
     $doctors = Customer::where('mr_id', $mr)->get();
     foreach ($doctors as $singleDoctor) {
         $actualVisits[$singleDoctor->id] = Report::where('mr_id', $mr)->where('month', $currentMonth)->where('doctor_id', $singleDoctor->id)->count();
         $MonthlyCustomerProducts[$singleDoctor->id] = Customer::monthlyProductsBought([$singleDoctor->id])->toArray();
     }
     $products = Product::where('line_id', Employee::findOrFail($mr)->line_id)->get();
     $coverageStats = Employee::coverageStats($mr, $currentMonth);
     $allManagers = Employee::yourManagers($mr);
     $totalProducts = Employee::monthlyDirectSales($mr, $currentMonth);
     $totalSoldProductsSales = $totalProducts['totalSoldProductsSales'];
     $totalSoldProductsSalesPrice = $totalProducts['totalSoldProductsSalesPrice'];
     $currentMonth = \Carbon\Carbon::parse($currentMonth);
     $lines = MrLines::select('line_id', 'from', 'to')->where('mr_id', $mr)->get();
     foreach ($lines as $line) {
         $lineFrom = \Carbon\Carbon::parse($line->from);
         $lineTo = \Carbon\Carbon::parse($line->to);
         if (!$currentMonth->lte($lineTo) && $currentMonth->gte($lineFrom)) {
             $MRLine = MrLines::where('mr_id', $mr)->where('line_id', $line->line_id)->get();
         }
     }
     $dataView = ['doctors' => $doctors, 'MonthlyCustomerProducts' => $MonthlyCustomerProducts, 'actualVisits' => $actualVisits, 'products' => $products, 'totalVisitsCount' => $coverageStats['totalVisitsCount'], 'actualVisitsCount' => $coverageStats['actualVisitsCount'], 'totalMonthlyCoverage' => $coverageStats['totalMonthlyCoverage'], 'allManagers' => $allManagers, 'totalSoldProductsSales' => $totalSoldProductsSales, 'totalSoldProductsSalesPrice' => $totalSoldProductsSalesPrice, 'MRLines' => $MRLine];
     return view('am.line.single', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:28,代码来源:LineController.php

示例2: create

 public function create($doctorId = NULL)
 {
     $description_names = Customer::distinct()->select('description_name')->where('mr_id', \Auth::user()->id)->get();
     $doctors = Customer::where('mr_id', \Auth::user()->id)->get();
     $products = Product::where('line_id', Employee::find(\Auth::user()->id)->line_id)->get();
     $gifts = Gift::all();
     $allManagers = Employee::yourManagers(\Auth::user()->id);
     $dataView = ['description_names' => $description_names, 'doctors' => $doctors, 'products' => $products, 'gifts' => $gifts, 'doctorId' => !empty($doctorId) ? $doctorId : '', 'allManagers' => $allManagers];
     if (!empty($doctorId)) {
         \Session::set('planned_visit', 1);
     }
     return view('mr.report.create', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:13,代码来源:ReportController.php


注:本文中的app\Employee::yourManagers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。