/** * Post a comment to a issue * * @return Redirect */ public function post_index() { if (!Input::get('comment')) { return Redirect::to(Project\Issue::current()->to() . '#new-comment')->with('notice-error', __('tinyissue.you_put_no_comment')); } $comment = \Project\Issue\Comment::create_comment(Input::all(), Project::current(), Project\Issue::current()); return Redirect::to(Project\Issue::current()->to() . '#comment' . $comment->id)->with('notice', __('tinyissue.your_comment_added')); }
/** * Post a comment to a issue * * @return Redirect */ public function post_index() { if (!Input::get('comment')) { return Redirect::to(Project\Issue::current()->to() . '#new-comment')->with('notice-error', 'You did not put in a comment!'); } $comment = \Project\Issue\Comment::create_comment(Input::all(), Project::current(), Project\Issue::current()); return Redirect::to(Project\Issue::current()->to() . '#comment' . $comment->id)->with('notice', 'Your comment has been added!'); }
public function post_savecomment() { $input = Input::all(); $issue = new Project\Issue(); $issue::load_issue($input['issue_id']); $project = new Project(); $project::load_project($input['project_id']); \Project\Issue\Comment::create_comment(Input::all(), $project::current(), $issue::current()); echo '1'; die; }