0
Give a select in your table tbl_answers and see if the fields search_id, question_id and opcao_id are not set to 0.
If yes changes to null and tries again.
0
1
Give a select in your table tbl_answers and see if the fields search_id, question_id and opcao_id are not set to 0.
If yes changes to null and tries again.
Thanks, I found out, I ate ball, because I’m already entering the option and did not need a relationship.
Browser other questions tagged laravel foreign-key
You are not signed in. Login or sign up in order to post.
This message is not of non-existent ID, but of the link with another table, probably your Sert depends on something else, you have to see which table is demanding it, without details of all tables and the Insert you made there is no way to guess where the error is. This error is not with Laravel, but with your bank structure or your database.
– Guilherme Nascimento
I inserted, I’m sorry.
– Ronaldo Adriano