Example #1
0
 /**
  * Show the form for editing the specified resource.
  * GET /ob/{id}/edit
  *
  * @param  int  $id
  * @return Response
  */
 public function recent_ob()
 {
     $profile = UserDetails::where('employee_id', Auth::user()->employee_id)->first();
     $getleave = AdminLogOB::with('user')->where('status', '!=', '')->orderBy('created_at', 'desc')->get();
     return View::make('admindashboard.recentob_logs')->with('admin', $profile)->with('getleave', $getleave)->with('title', 'STI | OB Logs');
 }
 public function post_delete($id)
 {
     $d_login = UserLogin::where('employee_id', $id)->first();
     $d_login->delete();
     $userlog = UserLeaveLog::where('employee_id', $id)->delete();
     LeaveWPay::where('employee_id', $id)->delete();
     LeaveWOPay::where('employee_id', $id)->delete();
     LeaveCounter::where('employee_id', $id)->delete();
     LeaveAWT::where('employee_id', $id)->delete();
     LeaveOB::where('employee_id', $id)->delete();
     AdminLogWP::where('employee_id', $id)->delete();
     AdminLogWOP::where('employee_id', $id)->delete();
     AdminLogOB::where('employee_id', $id)->delete();
     AdminLogAWT::where('employee_id', $id)->delete();
     AnnouncementComments::where('employee_id', $id)->delete();
     Approval::where('employee_id', $id)->delete();
     $d_user = UserDetails::where('employee_id', $id)->first();
     $d_user->delete();
     return Redirect::route('view_users');
 }