I have the following trouble.. I want to create form with binding to model.
My tables structure:
Table "Pages"
- id
- isHidden
- isDeleted
Table "Contents"
- id
- title
- content
Table "Seo"
- id
- title
- description
- keywords
Table "Contents_Pages"
- page_id
- content_id
- language_id
Table "Contents_Seo"
- page_id
- seo_id
Models structure
Model "Page"
public function content() {
return $this->belongsToMany('Content');
}
Model "Content"
public function seo() {
return $this->belongsToMany('Seo');
}
How to create it in one form, in view?