在使用雄辩的模型插入到数据库中时,我遇到了一个问题。我试过Model->save()和Model::create,但这对我没有帮助.此外,我在我的模型上定义了可填充属性,但是它没有工作。我的模型代码是: class Game extends Eloquent{ protected $fillable = array('title','year');
它工作得很好,但问题是当我包含“$query->where('prices.active','=','1');”这一行中,系统抛出的错误如下: "message":"SQLSTATE42S22:未找到列: 1054 'where子句‘中的未知列'prices.active’(SQL: select * from product_combinations where product_combinations.product_id
$this->id, ]SQLSTATE[42S22]: Column not found: 1054 Unknown column ' title' inSQL: select count(*) as aggregate from `pages` where ` title` = test and `id` <> )
在我的mysql中,我有id (小写)列,它是主键和标题列(也是小写)。