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