bradtraversy/laragigs

SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value

Closed this issue · 1 comments

insert into listings (title, company, location, website, email, tags, description, updated_at, created_at) values (Senior Software Developer, asdfsdf, Camden, DE, https://www.test.com, jonathan@test.com, Laravel, PHP, MySQL, asdf, 2022-11-09 21:28:13, 2022-11-09 21:28:13)

Had to add 'user_id' to the listing model.

protected $fillable = ['user_id','title', 'company', 'location', 'website', 'email', 'description', 'tags'];