public function dashboard() { $leavecount = LeaveCounter::where('employee_id', Auth::user()->employee_id)->first(); $announce = Announcements::with('user')->orderBy('created_at', 'desc')->get(); $profile = UserDetails::where('employee_id', '=', Auth::user()->employee_id)->first(); $recentleave = LeaveWPay::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $recentwleave = LeaveWOPay::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $obleave = LeaveOB::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $awtleave = LeaveAWT::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); return View::make('dashboard.dashboard')->with('announce', $announce)->with('profile', $profile)->with('countleave', $leavecount)->with('rleave', $recentleave)->with('obleave', $obleave)->with('awtleave', $awtleave)->with('sleave', $recentwleave)->with('title', 'STI | Dashboard'); }
/** * Display a listing of the resource. * GET /notification * * @return Response */ public function index() { $leavelog = UserLeaveLog::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $leaveoblog = LeaveOB::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $leavecount = LeaveCounter::where('employee_id', Auth::user()->employee_id)->first(); $profile = UserDetails::where('employee_id', '=', Auth::user()->employee_id)->first(); $recentleave = LeaveWPay::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $recentwleave = LeaveWOPay::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $obleave = LeaveOB::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); $awtleave = LeaveAWT::with('user')->where('employee_id', Auth::user()->employee_id)->orderBy('created_at', 'desc')->get(); return View::make('dashboard.notification_box')->with('profile', $profile)->with('leavelog', $leavelog)->with('rleave', $recentleave)->with('sleave', $recentwleave)->with('leaveob', $leaveoblog)->with('leaveawt', $awtleave)->with('countleave', $leavecount)->with('obleave', $obleave)->with('title', 'STI | Notification Box'); }
/** * Display the specified resource. * GET /atw/{id} * * @param int $id * @return Response */ public function show() { $profile = UserDetails::where('employee_id', Auth::user()->employee_id)->first(); $getleave = LeaveAWT::with('user')->where('status', '')->get(); return View::make('admindashboard.leaveatw')->with('admin', $profile)->with('getleave', $getleave)->with('title', 'STI | Authorization to Work (ATW)'); }