当前位置: 首页>>代码示例>>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;未经允许,请勿转载。