laravel-json-api/laravel

How to create resource belongsTo resource in one request?

Yeleup opened this issue · 3 comments

example: I have a Loan that contains Items

how to create items with one request?

Now I can create an element and attach it to a Loan, but I need to implement it in one request. Can I implement this through a library?

for example: POST api/loan/578/items

as if explaining what I am creating for Loan

In Atomic Operations, you can do it in one request. However, I don't know if the core specification supports it too. Can you give some more information about you want to do?

Loan HasMany Items
I have a POST request which add Item
so I need to add Item and add it for Loan

I'm sorry I'm confused

turns out a simple query does it

I got confused myself when I was thinking about another task

I apologize again

problem solved