Without any more information, you're basically asking someone to architect an entire application for your in the comments of a Laracasts forum post, entirely for free. You should probably do a little more leg work before just expecting someone else to do all of this work for you.
Chat API
I want to create a chat API for that how to store the messages in the Mongo DB what is the structure of the DB?
@nexxai Even I don't know that, I don't know the first step to take I was pushed into a project and I'm in a lot of confusion while I was searching for my answer I came to know about this website, like I'm a beginner in programming but travelling for more than 3 years but still in same like a beginner in programming
@gidr how about you start by looking at the chat API documentation and seeing the kind of responses you get back from it. You can then think about which parts of the response are relevant to your project and so what kind of columns your db tables might need.
Hey, How about you start by outlining the structure of your chat API and the kind of data it will return? For example, when you send or fetch a message, what details do you need—like sender, receiver, message content, timestamp, or status?
From there, you can design your MongoDB schema. A simple approach would be to create a messages collection with fields like chatId, senderId, receiverId, message, timestamp, and status. You can refine it based on the exact requirements of your project.
For instance, if you plan to include group chats, you might also need a participants field or a separate chats collection to manage group info. It’s really about starting with the data your API needs to handle and building the schema around that.
Please or to participate in this conversation.