F
Filament17mo ago
fadil

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '["1","5"]' for column 'jenisgame_id'

how to solve this eror
8 Replies
fadil
fadilOP17mo ago
please anyone can solve this problem?
Dennis Koch
Dennis Koch17mo ago
You are trying to save a string in an integer column. Checkboxlist can return multiple values. I cannot be a foreignId()
fadil
fadilOP17mo ago
what should i do? im a newbie please teach me
Dennis Koch
Dennis Koch17mo ago
Don't use $table->foreignId() in your migration. It must be $table->string()
wyChoong
wyChoong17mo ago
you need to rethink your table structure or you will have more issues waiting
fadil
fadilOP17mo ago
oke i try it
wyChoong
wyChoong17mo ago
you should be using many-to-many relationship https://laravel.com/docs/10.x/eloquent-relationships#many-to-many
fadil
fadilOP17mo ago
ok first i think i learn about many to many relationship thanks for your help, i think my table structure now its correct
Want results from more Discord servers?
Add your server