| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentBoards\Framework\Database\Orm; |
| 4 |
|
| 5 |
/** |
| 6 |
* @template TCollection of \FluentBoards\Framework\Database\Orm\Collection |
| 7 |
*/ |
| 8 |
trait HasCollection |
| 9 |
{ |
| 10 |
/** |
| 11 |
* Create a new Orm Collection instance. |
| 12 |
* |
| 13 |
* @param array<array-key, \FluentBoards\Framework\Database\Orm\Model> $models |
| 14 |
* @return TCollection |
| 15 |
*/ |
| 16 |
public function newCollection(array $models = []) |
| 17 |
{ |
| 18 |
return new static::$collectionClass($models); |
| 19 |
} |
| 20 |
} |
| 21 |
|