本文整理汇总了PHP中Courses::findRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP Courses::findRoute方法的具体用法?PHP Courses::findRoute怎么用?PHP Courses::findRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Courses
的用法示例。
在下文中一共展示了Courses::findRoute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postIndex
public function postIndex($route = '', $content = '', $idContent = '')
{
$course = Courses::findRoute($route);
$course->start = date("d-m-Y", strtotime($course->start));
$course->end = date("d-m-Y", strtotime($course->end));
if ($course) {
switch ($content) {
case 'arquivos':
return self::postCourseFiles($course->id, $course, $idContent);
break;
}
} else {
return View::make('specialpages.404');
}
}
示例2: getIndex
/**
* Display a listing of the resource.
*
* @return Response
*/
public function getIndex($route = '', $content = '', $idContent = '')
{
//
if ($route == '') {
return Redirect::to('http://abge.org.br');
} elseif ($route != '') {
$course = Courses::findRoute($route);
$course->start = date("d-m-Y", strtotime($course->start));
$course->end = date("d-m-Y", strtotime($course->end));
if ($course) {
switch ($content) {
case '':
return FrontendCourseController::getCourseContent($route, $course, $idContent);
break;
case 'content':
return FrontendCourseController::getCourseContent($route, $course, $idContent);
break;
case 'inscriptions':
return FrontendCourseController::getCourseInscription($route, $course, $idContent);
break;
case 'works':
return FrontendCourseController::getCourseWorks($route, $course, $idContent);
break;
case 'signin':
return FrontendCourseController::getCourseSignin($route, $course, $idContent);
break;
case 'files':
return FrontendCourseController::getCourseFiles($route, $course, $idContent);
break;
case 'filesuploaded':
return FrontendCourseController::getCourseFilesUploaded($route, $course, $idContent);
break;
case 'payment':
return FrontendCourseController::getCoursePayment($route, $course, $idContent);
break;
default:
return FrontendCourseController::getCourseContent($route, $course, $idContent);
break;
}
} else {
return View::make('specialpages.404');
}
}
}