public function addReply($conversation, $post) { $post->conversation_id = $conversation->id; $post->id = $this->database->table('posts')->insertGetId($post->toArray()); }