Example #1
0
 public function listAllPendingServicesRequests()
 {
     $employees = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
     $pendingServicesRequests = ServiceRequest::pending()->whereIn('mr_id', $employees)->get();
     $dataView = ['pendingServicesRequests' => $pendingServicesRequests];
     return view('am.service_request.pending', $dataView);
 }
Example #2
0
 public function getMRPendingServicesRequests()
 {
     $serviceRequests = ServiceRequest::pending()->get();
     return count($serviceRequests);
 }