What is your primary key column name on page table? Eloquent assume that each table has a primary key column named "id". Did you overwrite it in your model?
primary key is id INT(11) Auto Inc,
Page model:
<?php class Page extends Eloquent { /** * The database table used by the model. * * @var string */ protected $table = 'pages'; public function section() { return $this->hasMany('Section'); } public function carousel() { return $this->hasMany('Carousel'); } }Then why the query is using page_id as primary? Hmm.. It is late here in czech republic... I dont see where may be the problem here... :/
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community