#E-Commerce API Logic Check
1 messages · Page 1 of 1 (latest)
which table does the Foreign key fail?
i doesnt say it but i think it might be orders
is there anyway to say for sure?
- do you have an user with the id 1?
- do you have a product with the id 1?
- why do you get the user id like that? don't please, use
auth()->user()->idorauth()->id()for the currently authenticated user
if your answer to the first 2 questions is yes, then please make a github repo with your current code, because it shouldn't fail