Ejemplo n.º 1
0
 public static function getPmJobId()
 {
     $text = "MAN-";
     $data = \App\PmReport::all();
     $out = '';
     if ($data->count()) {
         $count = $data->count();
         $counts = $count + 1;
         if (strlen($counts) == 1) {
             $out .= $text . '000' . $counts;
         } else {
             if (strlen($counts) == 2) {
                 $out .= $text . '00' . $counts;
             } else {
                 if (strlen($counts) == 3) {
                     $out .= $text . '0' . $counts;
                 } else {
                     if (strlen($counts) == 1) {
                         $out .= $text . $counts;
                     }
                 }
             }
         }
         return $out;
     } else {
         return $out . '001';
     }
 }
Ejemplo n.º 2
0
 public function pm()
 {
     //return the pm view
     return view('pmDashboard', array('title' => 'PM | Welcome', 'reports' => \App\PmReport::all(), 'locations' => \App\LocationsForPm::all()));
 }