Пример #1
0
 public static function getOverloading($level, $levelid = null)
 {
     switch ($level) {
         case 'campus':
             return Correlation::select('batch', 'ratio', 'dropouts')->where('factorid', 9)->where('unittype', 'campus')->get();
         case 'college':
             return Correlation::select('batch', 'ratio', 'dropouts')->where('factorid', 9)->where('unittype', 'college')->where('collegeid', $levelid)->get();
         case 'department':
             return Correlation::select('batch', 'ratio', 'dropouts')->where('factorid', 9)->where('unittype', 'department')->where('departmentid', $levelid)->get();
         case 'program':
             return Correlation::select('batch', 'ratio', 'dropouts')->where('factorid', 9)->where('unittype', 'program')->where('programid', $levelid)->get();
         default:
             # code...
             break;
     }
 }