Beispiel #1
0
 public function getPublish($id = '')
 {
     if ($id == '') {
         return Redirect::to($this->route)->with('msg_error', Lang::get('messages.companies_display_err'));
     } else {
         $company = Companies::find($id);
         $publish = Companies::publish($id);
         if (!$publish) {
             return Redirect::to($this->route)->with('msg_error', Lang::get('messages.companies_publish_err', array('title' => $company->title)));
         } else {
             return Redirect::to($this->route)->with('msg_success', Lang::get('messages.companies_publish', array('title' => $company->title)));
         }
     }
 }