If I sent down some data with relationships, if there a way I can access these relationships on the page. Right now I am eloquenting (did I just coin this?) my way into a specific model, adding this data into an array and passing down that array.
Is there an easier was, since taking into account what I have just said, I would have to organize and send down multiple arrays.
@Sinnbeck Yes, this is what I should do. But I have a little problem.
i. I am adding from the Product Component which is adding it to a Cart DB.
ii. On the Cart Component I am fetching it from the database, as shown before which I will now change to resource API.
My question is, is how am I to tell this component to refresh, before I was using context, and when I updated the context the useEffect would detect the update.
Would it be correct in me saying that I should not only post request to the server for a db update, but also have a context working to allow the Cart Component to know whan to request api again?
@Randy_Johnson You just post the data to some endpoint that saves it (post or put), and then return redirect back(). This should tell inertia to reload the data on that page, with the updates. This is how I do it on a ton of pages.
You can tell inertia to only reload certain things, if needed
I have this in hope that the full page just refreshes, but still nothing is happening. If I use 'Welcome' instead, of course it jumps off to the welcome page. I am just making baby steps at the moment. If I go too fast, I fall even faster.
@Randy_Johnson Ah ok good :) But let me know if you cannot get it working. I work on this stack every day, so I can perhaps give you some examples or help debug if needed