本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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'));
}