本文整理汇总了PHP中app\Employee::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::select方法的具体用法?PHP Employee::select怎么用?PHP Employee::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Employee
的用法示例。
在下文中一共展示了Employee::select方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listAll
public function listAll()
{
$employees = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$customers = Customer::whereIn('mr_id', $employees)->get();
$dataView = ['customers' => $customers];
return view('am.customer.list', $dataView);
}
示例2: 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);
}
示例3: fetchInactive
/**
* Fetch all inactive employee records.
*
* @return \Illuminate\Http\JsonResponse
*/
public function fetchInactive()
{
$employees = App\Employee::select('EmployeeID', DB::raw('CONCAT(LastName, ", ", FirstName, " ",MiddleName) AS FullName'), 'EmailAddress')->where('Status', '=', '0')->orderBy('LastName')->get();
return Datatables::of($employees)->addColumn('action', function ($employee) {
return '<a href="/employees/' . $employee->EmployeeID . '" class="btn btn-xs btn-primary"><i class="glyphicon glyphicon-search"></i> View</a> ' . '<a href="/employees/' . $employee->EmployeeID . '/edit" class="btn btn-xs btn-primary"><i class="glyphicon glyphicon-edit"></i> Edit</a> ';
})->make(true);
}
示例4: search
public function search()
{
$AMs = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$MRs = Employee::whereIn('manager_id', $AMs)->get();
$dataView = ['MRs' => $MRs];
return view('sm.search.plans.search', $dataView);
}
示例5: create
public function create()
{
$employees = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$doctors = Customer::whereIn('mr_id', $employees)->get();
$dataView = ['doctors' => $doctors];
return view('am.plan.create', $dataView);
}
示例6: compose
/**
* Bind data to the view.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
$view->with('disposition_check', ['use as is', 'ncmr#', 'rework', 'split lot', 'shutdown', 'shipback']);
$view->with('cod_check', ['production', 'process', 'maintenance', 'facilities', 'quality assurance', 'others']);
$view->with('approvers', ['production', 'process', 'quality assurance', 'others']);
$view->with('names', Employee::select('name')->orderBy('name')->where('name', '<>', Auth::User()->employee->name)->get());
}
示例7: search
public function search()
{
$employeesLines = Employee::select('line_id')->where('manager_id', \Auth::user()->id)->get();
$products = Product::where('line_id', $employeesLines)->get();
$MRs = Employee::where('manager_id', \Auth::user()->id)->get();
$dataView = ['products' => $products, 'MRs' => $MRs];
return view('am.search.sales.search', $dataView);
}
示例8: 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);
}
示例9: search
public function search()
{
$classes = VisitClass::all();
$employees = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$specialties = Customer::select('specialty')->whereIn('mr_id', $employees)->distinct()->get();
$MRs = Employee::where('manager_id', \Auth::user()->id)->get();
$dataView = ['classes' => $classes, 'specialties' => $specialties, 'MRs' => $MRs];
return view('am.search.coverage.search', $dataView);
}
示例10: index
public function index()
{
$employees = Employee::select('line_id')->where('manager_id', \Auth::user()->id)->get();
$products = Product::whereIn('line_id', $employees)->get();
$employees = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$customers = Customer::whereIn('mr_id', $employees)->get();
$employees = Employee::where('manager_id', \Auth::user()->id)->get();
$dataView = ['productsCount' => count($products), 'plansCount' => AMPlan::where('month', \Config::get('app.current_month'))->count(), 'reportsCount' => AMReport::where('month', \Config::get('app.current_month'))->count(), 'customersCount' => count($customers), 'employeesCount' => count($employees)];
return view('am.index', $dataView);
}
示例11: mis
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function mis($months)
{
Excel::create('MIS&IT报销_' . $months, function ($excel) use($months) {
$companies = Company::where('name', 'CROP')->get();
foreach ($companies as $company) {
$excel->sheet('new Sheet', function ($sheet) use($company, $months) {
$sheet->setAllBorders('thin');
// Set border for cells
$sheet->setBorder('A1', 'thin');
// Font family
$sheet->setFontFamily('Comic Sans MS');
$sheet->setStyle(array('font' => array('name' => 'Calibri', 'size' => 11, 'bold' => false)));
$employees_id = Employee::select('id')->where('department_name', 'MIS')->orWhere('department_name', 'IT')->get();
$sum = \App\MobileFees::where('company_id', 6)->wherein('employee_id', $employees_id)->where('months', $months)->with('company', 'employee')->sum('fee');
$mobilefees = \App\MobileFees::where('company_id', 6)->wherein('employee_id', $employees_id)->where('months', $months)->with('company', 'employee')->get();
$sheet->loadView('report.mis')->with('mobilefees', $mobilefees)->with('sum', $sum)->with('company_name', $company->name);
});
}
})->download('xls');
}
示例12: listAllPendingLeaveRequests
public function listAllPendingLeaveRequests()
{
$AMsId = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$pendingLeaveRequests = AMLeaveRequest::pending()->whereIn('am_id', $AMsId)->get();
$dataView = ['pendingLeaveRequests' => $pendingLeaveRequests];
return view('sm.leave_request.pending', $dataView);
}
示例13: listAll
public function listAll()
{
$employees = Employee::select('line_id')->where('manager_id', \Auth::user()->id)->get();
$products = Product::whereIn('line_id', $employees)->get();
$dataView = ['products' => $products];
return view('am.product.list', $dataView);
}