This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi,
i'm writing a simple plugin (scaffolded with builder) for a crud thata manage cities (One Province for one city).
I created the relation of db (cities have a key provinceid) and a dropdown on form that retrieve list of provinces. Fetch Provinces works, but when click on create (save the record) i obtain the error
"SQLSTATE[HY000]: General error: 1364 Field 'province_id' doesn't have a default value (SQL: insert into lc_gestimm_cities
(name
) values (Tolentino))" on line 664 of C:\laragon\www\october\vendor\laravel\framework\src\Illuminate\Database\Connection.php"
How i can manage the thing in a way that save the province id on city ?
Thanks,
Luca
1-2 of 2