Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 2
0
 public function recent_awt()
 {
     $profile = UserDetails::where('employee_id', Auth::user()->employee_id)->first();
     $getleave = AdminLogAWT::with('user')->where('status', '!=', '')->orderBy('created_at', 'desc')->get();
     return View::make('admindashboard.recentawt_logs')->with('admin', $profile)->with('getleave', $getleave)->with('title', 'STI | ATW Logs');
 }