本文整理匯總了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'));
}
示例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;
}
示例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'));
}