We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c060da commit eca7481Copy full SHA for eca7481
README.md
@@ -40,11 +40,13 @@ class Post extends Model
40
protected $nested = ['option', 'comments'];
41
42
public function option() {
43
- return $this->hasOne('App\Option');
+ //it can be also morphOne
44
+ return $this->hasOne('App\Option');
45
}
46
47
public function comments() {
- return $this->hasMany('App\Comment');
48
+ //it can be also morphMany
49
+ return $this->hasMany('App\Comment');
50
51
52
```
0 commit comments