#E-Commerce API Logic Check

1 messages · Page 1 of 1 (latest)

indigo dagger
#

need some help debugging

severe scaffold
#

which table does the Foreign key fail?

indigo dagger
#

i doesnt say it but i think it might be orders
is there anyway to say for sure?

tacit totem
#
  1. do you have an user with the id 1?
  2. do you have a product with the id 1?
  3. why do you get the user id like that? don't please, use auth()->user()->id or auth()->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

indigo dagger
#

omg i didntt have user id 1

#

it was driving me crazy