public function totalAssignmentsByTag($arrayGroups) { $array = array(); $arrayAux = array(); $arrayAux['label'] = 'analysis'; $arrayAux['value'] = Assignment::whereIn('group_id', $arrayGroups)->whereIn('tags', array('analysis'))->count(); $arrayAux['color'] = GroupController::getColors(true); $arrayAux['highlight'] = "#FF5A5E"; array_push($array, $arrayAux); $arrayAux = array(); $arrayAux['label'] = 'database'; $arrayAux['value'] = Assignment::whereIn('group_id', $arrayGroups)->whereIn('tags', array('database'))->count(); $arrayAux['color'] = GroupController::getColors(true); $arrayAux['highlight'] = "#FF5A5E"; array_push($array, $arrayAux); $arrayAux = array(); $arrayAux['label'] = 'design'; $arrayAux['value'] = Assignment::whereIn('group_id', $arrayGroups)->whereIn('tags', array('design'))->count(); $arrayAux['color'] = GroupController::getColors(true); $arrayAux['highlight'] = "#FF5A5E"; array_push($array, $arrayAux); $arrayAux = array(); $arrayAux['label'] = 'programming'; $arrayAux['value'] = Assignment::whereIn('group_id', $arrayGroups)->whereIn('tags', array('programming'))->count(); $arrayAux['color'] = GroupController::getColors(true); $arrayAux['highlight'] = "#FF5A5E"; array_push($array, $arrayAux); $arrayAux = array(); $arrayAux['label'] = 'testing'; $arrayAux['value'] = Assignment::whereIn('group_id', $arrayGroups)->whereIn('tags', array('testing'))->count(); $arrayAux['color'] = GroupController::getColors(true); $arrayAux['highlight'] = "#FF5A5E"; array_push($array, $arrayAux); return $array; }