Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pn523's avatar
Level 2

Update in Laravel API

I am using Reactjs as frontend and Laravel as API backend.

How do i send id of a post to be updated to API ? ( I already know the format is /post/{id} for an update request ) I mean do i have to make first GET request from Reactjs to get the id of post and then another PUT request from Reactjs with the obtained id in order to update ?

0 likes
1 reply
deepu07's avatar

@pn whenever user hit on Post update button you jus grab the id of the post and send it to the Backend. I believe without processing a Get request you have it id already with you.

Please or to participate in this conversation.