it gives me 404. But when i use $post->id it works. Does it has to do with id being the primary key? how can i achieve this?i want to update the posts using id but show the posts using post_id column.
I'm still confused, why do you need two ids? The method you're using shouldn't make any difference, both should identify the post by the same field. It sounds like you're over complicating things because there's something you're not quite understanding.
I want to show the post using post_id because if i show the post using uuid, a user might copy the uuid and go to inspect element and paste it on the form action and update some other post. If this is not the right way to achieve this, could you please suggest the right method.
Will this prevent from updating using the inspect element action? I mean if someone goes to inspect element and change the /{uuid} to some other posts uuid which does not belong to that user?
Yes, because they won't own the post, this is done in the update method, how that method gets the data, even if they just sent a direct post request makes no difference.