Open Abdukhaligov opened 6 days ago
Table: id, content, post_id -> reference to posts user_id -> reference to useres
Endpoints: GET - {post}/reviews - to get list of the reviews POST - {post}/reviews - to create a review, only content neede to sent, user_id and post_id will be filled from BE DELETE - {post}/reviews - check if it's current user review, then delete it
Frontend:
Update show.blade.php to show the list of reviews
Add form to show.blade.php for creating a post, with one Textarea field, Submit
and Cancel
buttons if user logged id
Let's assume you want to introduce a feature that allows users to leave reviews for products. How would you architect this on the backend? Discuss database schema changes, API modifications, and frontend changes.