Example #1
0
 public function ajaxVisitStatue()
 {
     $statue = [];
     //Planned VS Not Planned
     $planned = Report::planned()->count();
     $notPlanned = Report::notPlanned()->count();
     $statue[0]['label'] = 'Planned';
     $statue[0]['data'] = $planned;
     $statue[1]['label'] = 'Not Planned';
     $statue[1]['data'] = $notPlanned;
     return json_encode($statue);
 }