Skip to content

Commit 11ae0ef

Browse files
committed
Update readme for the trait
1 parent 04e948d commit 11ae0ef

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ protected $fillable = array(
1515
}
1616
```
1717

18-
and must have this method :
18+
and must use the following trait:
1919

2020
```php
21-
public function newCollection(array $models = array())
22-
{
23-
return new \TypiCMS\NestableCollection($models);
24-
}
21+
22+
use TypiCMS\NestableTrait;
23+
2524
```
2625

2726
Now each time you get a collection of that model, it will be an instance of **TypiCMS\NestableCollection** in place of **Illuminate\Database\Eloquent\Collection**.

0 commit comments

Comments
 (0)