コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $employees = \App\Employee::with(['roles' => function ($query) {
         $query->where('date_end', NULL);
     }], ['projects' => function ($query) {
         $query->where('date_end', NULL);
     }])->get();
     $title = 'Employees';
     return view('employees.index', compact('employees', 'title'));
 }
コード例 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $employees = Employee::with(['company', 'department', 'status', 'level', 'category'])->get(['number', 'name', 'company_id', 'status_id', 'department_id', 'level_id', 'bank_account', 'telephone']);
     return view('employee.index')->with('employees', $employees);
 }
コード例 #3
0
ファイル: EmployeeRepo.php プロジェクト: rob1121/qdn
 /**
  * @return mixed
  */
 public function all()
 {
     return Employee::with('user')->orderBy('user_id')->get();
 }
コード例 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $employees = Employee::with(['company', 'status'])->orderBy('number', 'DESC')->get();
     return view('employee.index', compact('employees'));
 }
コード例 #5
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $employees = Employee::with('company_structure')->get();
     //$employees = Employee::all();
     return view('backend.employees.index', compact('employees'));
 }
コード例 #6
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $employees = Employee::with('company', 'level', 'category')->get();
     return view('employee.index')->with('employees', $employees);
 }
コード例 #7
0
 /**
  * Show the main index (directory listing)
  *
  * @return mixed
  */
 public function index()
 {
     // Eager load the relationships to reduce DB calls
     $employees = Employee::with('department', 'location')->get();
     return view('index', compact('employees'));
 }