我正在使用这个包
https://github.com/cviebrock/eloquent-taggable
在我尝试在我的博客上标记时出现错误
SQLSTATE [23000]:完整性约束违规:1048列'taggable_id'不能为空(SQL:插入
taggable_taggables
(created_at
,tag_id
,taggable_id
,{ {1}},taggable_type
)值(2016-07-05 21:24:20,1 ,, App \ blog,2016-07-05 21:24:20))
这是我的控制器
updated_at
答案 0 :(得分:0)
注意:
insert into `taggable_taggables`
(`created_at` , `tag_id`, `taggable_id`, `taggable_type`, `updated_at`)
|
values |
(2016-07-05 21:24:20, 1 , | , App\blog , 2016-07-05 21:24:20))
^ what's missing here?