Ejemplo n.º 1
0
 private function setCombination()
 {
     $cat = CategoryModel::all();
     if ($cat != null) {
         for ($c = 0; $c < count($cat); $c++) {
             $data[$cat[$c]->category_code] = $this->getClassCount($cat[$c]->category_code, $this->subjects[$c]);
         }
         array_walk($data, array($this, 'Compare'));
         return $this->combination;
     } else {
         dd("error occured");
     }
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return Category::all();
 }