コード例 #1
0
ファイル: CourseController.php プロジェクト: nagyist/abge
 public function getPublish($id = '')
 {
     if ($id == '') {
         return Redirect::to($this->route)->with('msg_error', Lang::get('messages.courses_display_err'));
     } else {
         $course = Courses::find($id);
         $publish = Courses::publish($id);
         if (!$publish) {
             return Redirect::to($this->route)->with('msg_error', Lang::get('messages.courses_publish_err', array('title' => $course->title)));
         } else {
             return Redirect::to($this->route)->with('msg_success', Lang::get('messages.courses_publish', array('title' => $course->title)));
         }
     }
 }