SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '["1","5"]' for column 'jenisgame_id'
how to solve this eror
![](https://cdn.answeroverflow.com/1130526217792131232/image.png)
![](https://cdn.answeroverflow.com/1130526218102513705/image.png)
![](https://cdn.answeroverflow.com/1130526218391916675/image.png)
![](https://cdn.answeroverflow.com/1130526218689716446/image.png)
![](https://cdn.answeroverflow.com/1130526218987524096/image.png)
8 Replies
please anyone can solve this problem?
You are trying to save a string in an integer column. Checkboxlist can return multiple values. I cannot be a
foreignId()
what should i do?
im a newbie please teach me
Don't use
$table->foreignId()
in your migration. It must be $table->string()
you need to rethink your table structure or you will have more issues waiting
oke i try it
you should be using many-to-many relationship
https://laravel.com/docs/10.x/eloquent-relationships#many-to-many
ok first i think i learn about many to many relationship
thanks for your help, i think my table structure now its correct