Creates a new Laravel collection for a model.
Note
You need to add the collection to your model
public function newCollection(array $models = []): Collection
{
return new UserCollection($models);
}
beyond:make:collection {name} {--force}
Parameters | Description |
---|---|
name | The name of your collection |
Flags | Description |
---|---|
--force | Overwrite existing file |