FluxBB\Actions\Reply::run PHP Method

run() protected method

protected run ( )
    protected function run()
    {
        $id = $this->get('id');
        $conversation = $this->conversations->findById($id);
        $creator = User::current();
        $post = new Post(['poster' => $creator->username, 'poster_id' => $creator->id, 'message' => $this->get('message'), 'posted' => Carbon::now()]);
        $this->conversations->addReply($conversation, $post);
        $this->raise(new UserHasPosted($creator, $post));
        return ['post' => $post];
    }