0👍
✅
When requesting your posts to your page, via a GET method I suppose, pass a unique identifier to each post, the id would work perfectly here.
Make you controller work so as to add entries to a pivot table that contains the id of the user and the id of the post. When writing your logic for the like function, make a vue method that has as an argument the id of the post, and pass that key in the data of an axios post request and do the processing in Laravel as you’ll normally do.
Source:stackexchange.com