/** * 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')); }
/** * 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); }
/** * @return mixed */ public function all() { return Employee::with('user')->orderBy('user_id')->get(); }
/** * 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')); }
/** * 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')); }
/** * 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); }
/** * 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')); }