Example #1
0
 public function add_new_class_franchise()
 {
     $currentPage = "CLASSES_FRANCHISE";
     $mainMenu = "CLASSES_MAIN";
     $franchiseeCourses = Courses::where('franchisee_id', '=', Session::get('franchiseId'))->get();
     $franchiseeBaseprice = ClassBasePrice::getBasePricebyFranchiseeId();
     $getAllClassesForFranchise = Classes::getAllClassesForFranchise();
     for ($i = 0; $i < sizeof($getAllClassesForFranchise); $i++) {
         $courseMasterId = Courses::where('id', '=', $getAllClassesForFranchise[$i]['course_id'])->get();
         $courseMasterId = $courseMasterId[0];
         $courseName = CoursesMaster::where('id', '=', $courseMasterId['master_course_id'])->get();
         $courseName = $courseName[0];
         $getAllClassesForFranchise[$i]['course_name'] = $courseName['course_name'];
         $getBasePrice = ClassBasePrice::where('base_price_no', '=', $getAllClassesForFranchise[$i]['base_price_no'])->get();
         $getBasePrice = ClassBasePrice::where('base_price_no', '=', $getAllClassesForFranchise[$i]['base_price_no'])->get();
         //$getBasePrice = $getBasePrice[0];
         if ($getAllClassesForFranchise[$i]['base_price_no'] == 0) {
             $getAllClassesForFranchise[$i]['base_price'] = '';
         } else {
             $getAllClassesForFranchise[$i]['base_price'] = $getBasePrice[0]['base_price'];
         }
     }
     //return $getAllClassesForFranchise;
     return View::make('pages.classes.add_new_class_franchise', compact('currentPage', 'mainMenu', 'franchiseeCourses', 'franchiseeBaseprice', 'getAllClassesForFranchise'));
 }
Example #2
0
 static function getFranchiseCoursesList($franchiseeID = null)
 {
     $courses = Courses::where('franchisee_id', '=', $franchiseeID)->lists('course_name', 'id');
     /* if($franchiseeID != null){
     			$query->where('franchisee_id', '=', $franchiseeID);
     		}
     	
     		$courses = $query->get(); */
     return $courses;
 }
Example #3
0
 public function viewCourses()
 {
     $currentPage = "COURSES";
     $mainMenu = "COURSES_MAIN";
     $eligibleForAction = array();
     $allCourse = CoursesMaster::getAllCourses();
     for ($i = 0; $i < count($allCourse); $i++) {
         $Master_course_id = $allCourse[$i]['id'];
         $getCoursesCount = Courses::where('master_course_id', '=', $Master_course_id)->get();
         if (count($getCoursesCount) == 0) {
             array_push($eligibleForAction, $Master_course_id);
         }
     }
     //return $eligibleForAction;
     return View::make('pages.courses.courses', compact('currentPage', 'mainMenu', 'allCourse', 'eligibleForAction'));
 }