當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Courses::where方法代碼示例

本文整理匯總了PHP中Courses::where方法的典型用法代碼示例。如果您正苦於以下問題:PHP Courses::where方法的具體用法?PHP Courses::where怎麽用?PHP Courses::where使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Courses的用法示例。


在下文中一共展示了Courses::where方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: add_new_class_franchise

 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'));
 }
開發者ID:Headrun-php,項目名稱:TLG,代碼行數:25,代碼來源:ClassesController.php

示例2: getFranchiseCoursesList

 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;
 }
開發者ID:Headrun-php,項目名稱:TLG,代碼行數:10,代碼來源:Courses.php

示例3: viewCourses

 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'));
 }
開發者ID:Headrun-php,項目名稱:TLG,代碼行數:16,代碼來源:CoursesController.php


注:本文中的Courses::where方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。