本文整理汇总了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'));
}