Example #1
0
 public function pmReportTag($id)
 {
     $report = PmReport::find($id);
     $report->tag = 1;
     $report->save();
     return Redirect::to('/pm')->with('message', 'Report Taged!');
 }
Example #2
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';
     }
 }
Example #3
0
 public function pm()
 {
     //return the pm view
     return view('pmDashboard', array('title' => 'PM | Welcome', 'reports' => \App\PmReport::all(), 'locations' => \App\LocationsForPm::all()));
 }