public function toggle($property) { parent::toggle($property); Alerts::add('success', trans('forum::base.thread_updated')); }
public function deletePost($threadID, $threadAlias, $postID) { $this->load(['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['tag']->route); } return Redirect::to($this->collections['thread']->route); }
public static function processValidationMessages($messages) { foreach ($messages as $message) { Alerts::add('danger', $message); } }