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


PHP Employee::whereIn方法代码示例

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


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

示例1: achievement

 public function achievement()
 {
     $AMIds = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
     $MRs = Employee::whereIn('manager_id', $AMIds)->get();
     $dataView = ['MRs' => $MRs];
     return view('sm.line.history.search', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:LineController.php

示例2: search

 public function search()
 {
     $AMsIds = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
     $MRs = Employee::whereIn('manager_id', $AMsIds)->get();
     $dataView = ['MRs' => $MRs];
     return view('sm.customer.search', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:CustomerController.php

示例3: listAll

 public function listAll()
 {
     $AMsIds = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
     $MRs = Employee::whereIn('manager_id', $AMsIds)->get();
     $AMs = Employee::where('manager_id', \Auth::user()->id)->get();
     $dataView = ['MRs' => $MRs, 'AMs' => $AMs];
     return view('sm.employee.list', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:8,代码来源:EmployeeController.php

示例4: search

 public function search()
 {
     $AMIds = Employee::select('id')->where('manager_id', 1)->get();
     $classes = VisitClass::all();
     $employees = Employee::select('id')->whereIn('manager_id', $AMIds)->get();
     $specialties = Customer::select('specialty')->whereIn('mr_id', $employees)->distinct()->get();
     $MRs = Employee::whereIn('manager_id', $AMIds)->get();
     $dataView = ['classes' => $classes, 'specialties' => $specialties, 'MRs' => $MRs];
     return view('sm.search.coverage.search', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:10,代码来源:CoverageController.php

示例5: search

 public function search()
 {
     $products = Product::all();
     $gifts = Gift::all();
     $doctors = Customer::all();
     $AMsIds = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
     $MRs = Employee::whereIn('manager_id', $AMsIds)->get();
     $AMs = Employee::where('manager_id', \Auth::user()->id)->get();
     $dataView = ['doctors' => $doctors, 'products' => $products, 'gifts' => $gifts, 'MRs' => $MRs, 'AMs' => $AMs];
     return view('sm.search.reports.search', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:11,代码来源:ReportController.php

示例6: index

 public function index()
 {
     $AMsIds = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
     $employees = Employee::select('line_id')->whereIn('manager_id', $AMsIds)->get();
     //am_session
     $products = Product::whereIn('line_id', $employees)->get();
     $employeesId = Employee::select('id')->whereIn('manager_id', $AMsIds)->get();
     $customers = Customer::whereIn('mr_id', $employeesId)->get();
     $MRs = Employee::whereIn('manager_id', $AMsIds)->get();
     $AMs = Employee::where('manager_id', \Auth::user()->id)->get();
     $dataView = ['productsCount' => count($products), 'plansCount' => SMPlan::where('month', \Config::get('app.current_month'))->count(), 'reportsCount' => SMReport::where('month', \Config::get('app.current_month'))->count(), 'customersCount' => count($customers), 'employeesCount' => count($MRs) + count($AMs)];
     return view('sm.index', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:13,代码来源:DashboardController.php

示例7: index

 /**
  * Show the application welcome screen to the user.
  *
  * @return Response
  */
 public function index()
 {
     //helpers
     $rating_date = mktime(0, 0, 0, date('n', time()), date('j', time()), date('Y', time()));
     //get form select options and quality radio buttons
     $brands = Brand::companyBrands()->get()->lists('name', 'id');
     $residences = Residence::companyResidences()->get()->lists('name', 'id');
     $companies = Company::userCompanies()->get()->lists('name', 'id');
     $companies_ids = Company::userCompanies()->get()->lists('id');
     foreach ($companies_ids as $company_id) {
         $company_ids[] = $company_id;
     }
     $languages = Language::all()->lists('name', 'id');
     array_unshift($languages, "Choose other language");
     $qualities = Qualities::CompanyQualities()->get();
     //get all employees
     $employees = Employee::whereIn('company_id', $company_ids)->with('company', 'residence', 'phone', 'qualities', 'language')->with(['dates' => function ($query) {
         $query->whereRaw('(? BETWEEN dates.start AND dates.end OR dates.start>?) AND dates.type IN("day_off", "annual_leave")', array(mktime(0, 0, 0, date('n', time()), date('j', time()), date('Y', time())), mktime(0, 0, 0, date('n', time()), date('j', time()), date('Y', time()))));
     }])->status('active')->get();
     //return $employees;
     return view('search', compact('brands', 'residences', 'languages', 'employees', 'rating_date', 'qualities', 'companies'));
 }
开发者ID:sivanova27,项目名称:service_laravel,代码行数:27,代码来源:SearchController.php


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