public static function processValidationMessages($messages)
 {
     foreach ($messages as $message) {
         Alerts::add('danger', $message);
     }
 }
Example #2
0
 public function toggle($property)
 {
     parent::toggle($property);
     Alerts::add('success', trans('forum::base.thread_updated'));
 }
 public function deletePost($categoryID, $categoryAlias, $threadID, $threadAlias, $postID)
 {
     $this->load(['category' => $categoryID, 'thread' => $threadID, 'post' => $postID]);
     $this->posts->delete($postID);
     Alerts::add('success', trans('forum::base.post_deleted'));
     // Force deletion of the thread if it has no remaining posts
     if ($this->collections['thread']->posts->count() == 0) {
         $this->threads->delete($threadID);
         return Redirect::to($this->collections['category']->route);
     }
     return Redirect::to($this->collections['thread']->route);
 }