FluxBB\Actions\EditPost::run PHP Method

run() protected method

protected run ( )
    protected function run()
    {
        $pid = $this->get('id');
        $post = Post::with('author', 'topic')->findOrFail($pid);
        $creator = User::current();
        $post->fill(['message' => $this->get('message'), 'edited' => Carbon::now(), 'edited_by' => $creator->username]);
        $post->save();
        $this->raise(new PostWasEdited($post, $creator));
        return ['post' => $post];
    }
EditPost