Shopping cart checkout

IBUNHABIBU IBUNHABIBU posted on 2022-12-23 08:00:15 UTC

Concerning the lesson for the shopping cart with turbo. I've also added user authentication and authorization. I need the admin to be able to see all orders of all customers and their state, whether in process or shipped, and the normal user to be able to access all order history. Can you assist me in making this association?

David Kimura PRO said about 1 month ago :
You would need an Order model that belongs to the user. Once the order has been placed, you, as an admin, could query all of the orders and their statuses. As a user, they should be able to query just their orders since there is a relationship to the user.

Login to Comment
Back to forums