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


PHP Employee::all方法代码示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified branch.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $rel = ERelief::find($id);
     $employees = Employee::all();
     $reliefs = Relief::all();
     return View::make('employee_relief.edit', compact('rel', 'employees', 'reliefs'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:13,代码来源:EmployeeReliefController.php

示例2: edit

 /**
  * Show the form for editing the specified branch.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $eallw = EAllowances::find($id);
     $employees = Employee::all();
     $allowances = Allowance::all();
     return View::make('employee_allowances.edit', compact('eallw', 'allowances', 'employees'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:13,代码来源:EmployeeAllowancesController.php

示例3: edit

 /**
  * Show the form for editing the specified branch.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $ded = EDeduction::find($id);
     $employees = Employee::all();
     $deductions = Deduction::all();
     return View::make('employee_deductions.edit', compact('ded', 'employees', 'deductions'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:13,代码来源:EmployeeDeductionsController.php

示例4: edit

 /**
  * Show the form for editing the specified leaveapplication.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $leaveapplication = Leaveapplication::find($id);
     $employees = Employee::all();
     $leavetypes = Leavetype::all();
     return View::make('leaveapplications.edit', compact('leaveapplication', 'employees', 'leavetypes'));
 }
开发者ID:kenkode,项目名称:xpose,代码行数:13,代码来源:LeaveapplicationsController.php

示例5: index

 public function index()
 {
     $entities = Entity::all();
     $employees = Employee::all();
     $menu = 'data';
     return View::make('entities.index', compact('employees', 'entities', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:7,代码来源:EntitiesController.php

示例6: store

 /**
  * Store a newly created branch in storage.
  *
  * @return Response
  */
 public function store()
 {
     $employees = Employee::all();
     foreach ($employees as $employee) {
         $payroll = new Payroll();
         $payroll->employee_id = $employee->personal_file_number;
         $payroll->basic_pay = $employee->basic_pay;
         $payroll->earning_amount = Payroll::total_benefits($employee->id);
         $payroll->taxable_income = Payroll::gross($employee->id);
         $payroll->paye = Payroll::tax($employee->id);
         $payroll->nssf_amount = Payroll::nssf($employee->id);
         $payroll->nhif_amount = Payroll::nhif($employee->id);
         $payroll->other_deductions = Payroll::deductions($employee->id);
         $payroll->total_deductions = Payroll::total_deductions($employee->id);
         $payroll->net = Payroll::net($employee->id);
         $payroll->financial_month_year = Input::get('period');
         $payroll->account_id = Input::get('account');
         $payroll->save();
     }
     $allws = DB::table('employee_allowances')->join('allowances', 'employee_allowances.allowance_id', '=', 'allowances.id')->join('employee', 'employee_allowances.employee_id', '=', 'employee.id')->join('transact', 'employee.personal_file_number', '=', 'transact.employee_id')->select('employee.id', 'allowance_name', 'allowance_id', 'allowance_amount', 'financial_month_year')->get();
     foreach ($allws as $allw) {
         DB::table('transact_allowances')->insert(['employee_id' => $allw->id, 'allowance_name' => $allw->allowance_name, 'allowance_id' => $allw->allowance_id, 'allowance_amount' => $allw->allowance_amount, 'financial_month_year' => $allw->financial_month_year]);
     }
     $deds = DB::table('employee_deductions')->join('deductions', 'employee_deductions.deduction_id', '=', 'deductions.id')->join('employee', 'employee_deductions.employee_id', '=', 'employee.id')->join('transact', 'employee.personal_file_number', '=', 'transact.employee_id')->select('employee.id', 'deduction_name', 'deduction_id', 'deduction_amount', 'financial_month_year')->get();
     foreach ($deds as $ded) {
         DB::table('transact_deductions')->insert(['employee_id' => $ded->id, 'deduction_name' => $ded->deduction_name, 'deduction_id' => $ded->deduction_id, 'deduction_amount' => $ded->deduction_amount, 'financial_month_year' => $ded->financial_month_year]);
     }
     $earns = DB::table('earnings')->join('employee', 'earnings.employee_id', '=', 'employee.id')->join('transact', 'employee.personal_file_number', '=', 'transact.employee_id')->select('earnings.employee_id', 'earnings_name', 'financial_month_year', 'earnings_amount')->get();
     foreach ($earns as $earn) {
         DB::table('transact_earnings')->insert(['employee_id' => $earn->employee_id, 'earning_name' => $earn->earnings_name, 'earning_amount' => $earn->earnings_amount, 'financial_month_year' => $earn->financial_month_year]);
     }
     $period = Input::get('period');
     Audit::logaudit('Payroll', 'process', 'processed payroll for ' . $period);
     return Redirect::route('payroll.index')->withFlashMessage('Payroll successfully processed!');
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:40,代码来源:PayrollController.php

示例7: child_model_keeps_scope

 /** @test */
 public function child_model_keeps_scope()
 {
     User::create(['type' => Employee::class]);
     User::create(['type' => null]);
     $users = Employee::all();
     $this->assertCount(1, $users);
     $this->assertInstanceOf(Employee::class, $users->first());
 }
开发者ID:tonysm,项目名称:eloquent-sti,代码行数:9,代码来源:SingleTableInheritanceIntegrationTest.php

示例8: employee_identity

 public function employee_identity()
 {
     $name = Employee::all();
     if ($name) {
         return $name;
     }
     return NULL;
 }
开发者ID:testoodoo,项目名称:OoodooSiteUp,代码行数:8,代码来源:Ticket.php

示例9: edit

 public function edit($id)
 {
     $movement = Movement::findOrFail($id);
     $courses = Course::where('location_id', '=', Auth::user()->location_id)->get();
     $employees = Employee::all();
     $menu = 'student';
     return View::make('movements.edit', compact('movement', 'courses', 'employees', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:8,代码来源:MovementsController.php

示例10: index

 public function index()
 {
     $users = User::all();
     $employees = Employee::all();
     $locations = Location::all();
     $menu = 'data';
     return View::make('users.index', compact('users', 'employees', 'locations', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:8,代码来源:UsersController.php

示例11: index

 public function index()
 {
     $handbooks = Handbook::where('project_id', '=', Auth::user()->curr_project_id)->get();
     $employees = Employee::all();
     $generations = Generation::all();
     $majors = Major::all();
     $menu = 'project';
     return View::make('handbooks.index', compact('employees', 'handbooks', 'generations', 'majors', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:9,代码来源:HandbooksController.php

示例12: index

 public function index()
 {
     $this->load->model('Employee');
     $employees = Employee::all();
     if ($employees === null) {
         $response = array('Status' => "Fail", "ErrorMessage" => "No Users Found");
     } else {
         $response = array('Status' => "Success", 'data' => $employees);
     }
     $this->output->set_content_type('application/json')->set_output(json_encode($response));
 }
开发者ID:BlueDamonVen,项目名称:nearsource,代码行数:11,代码来源:EmployeeController.php

示例13: sandbox

 public static function sandbox()
 {
     $service = Service::find(1);
     $services = Service::all();
     $employees = Employee::all();
     $employee = Employee::find(1);
     $service2 = new Service(array('name' => 'aasdd', 'price' => "2", 'description' => "asfafaf"));
     $errors = $service2->errors();
     Kint::dump($employee);
     Kint::dump($employees);
     Kint::dump($service);
     Kint::dump($services);
     Kint::dump($errors);
     //        View::make('helloworld.html');
 }
开发者ID:Zonsu,项目名称:Tsoha-Bootstrap,代码行数:15,代码来源:hello_world_controller.php

示例14: employee

 public function employee()
 {
     $ids = DB::table('tblEmployees')->select('strEmpID')->orderBy('updated_at', 'desc')->orderBy('strEmpID', 'desc')->take(1)->get();
     $ID = $ids["0"]->strEmpID;
     $newID = $this->smart($ID);
     $ids2 = DB::table('tblLogin')->select('strUsername')->orderBy('strUsername', 'desc')->take(1)->get();
     $ID2 = $ids2["0"]->strUsername;
     $newID2 = $this->smart($ID2);
     // Get all products from the database
     $employees = Employee::all();
     $branches = Branch::lists('strBrchName', 'strBrchID');
     $roles = Role::lists('strRoleDescription', 'strRoleID');
     $data = array('employees' => $employees, 'branches' => $branches, 'roles' => $roles);
     return View::make('employee')->with('data', $data)->with('newID', $newID)->with('newID2', $newID2);
 }
开发者ID:ExperimentalGroup,项目名称:inventoryfinal,代码行数:15,代码来源:HomeController.php

示例15: create

 public function create()
 {
     $menu = 'registration';
     $generations = Generation::all();
     $classifications = Classification::where('category', '=', 'Registration')->get();
     $locations = Location::where('id', '<>', Auth::user()->location_id)->get();
     $employees = Employee::all();
     $courses = Course::where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->where('availability', '=', 1)->where('active', '=', 1)->get();
     $discounts = Discount::all();
     $promotions = Promotion::all();
     $vouchers = Voucher::all();
     $charges = Charge::all();
     $partners = Partner::where('location_id', '=', Auth::user()->location_id)->get();
     return View::make('registrations.create', compact('classifications', 'locations', 'employees', 'generations', 'courses', 'charges', 'discounts', 'promotions', 'vouchers', 'partners', 'menu'));
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:15,代码来源:RegistrationsController.php


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