Skip to content

Commit eca7481

Browse files
author
Piotr Krajewski
committed
readme
1 parent 0c060da commit eca7481

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ class Post extends Model
4040
protected $nested = ['option', 'comments'];
4141

4242
public function option() {
43-
return $this->hasOne('App\Option');
43+
//it can be also morphOne
44+
return $this->hasOne('App\Option');
4445
}
4546

4647
public function comments() {
47-
return $this->hasMany('App\Comment');
48+
//it can be also morphMany
49+
return $this->hasMany('App\Comment');
4850
}
4951
}
5052
```

0 commit comments

Comments
 (0)