Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illuminate\Database\Eloquent\Relation\HasOneOrMany::createMany Returns array #15943

Closed
colindecarlo opened this issue Oct 16, 2016 · 0 comments
Closed

Comments

@colindecarlo
Copy link
Contributor

  • Laravel Version: dev-master
  • PHP Version: 7
  • Database Driver & Version: none

Description:

While there is enough information available to return something more useful, Illuminate\Database\Eloquent\Relation\HasOneOrMany::createMany returns an array. It should return an instance of Illuminate\Database\Eloquent\Collection based on the $related model.

Steps To Reproduce:

$hasMany = new \Illuminate\Database\Eloquent\Relation\HasMany($builder, $parent, $foreignKey, $id);
$instances = $hasMany->createMany($records);
colindecarlo added a commit to colindecarlo/framework that referenced this issue Oct 16, 2016
…abase\Eloquent\Relation\HasOneOrMany::createMany

See laravel#15943
colindecarlo added a commit to colindecarlo/framework that referenced this issue Oct 16, 2016
colindecarlo added a commit to colindecarlo/framework that referenced this issue Oct 16, 2016
colindecarlo added a commit to colindecarlo/framework that referenced this issue Oct 17, 2016
taylorotwell pushed a commit that referenced this issue Oct 17, 2016
)

* Return an Illuminate\Database\Eloquent\Collection from Illuminate\Database\Eloquent\Relation\HasOneOrMany::createMany

See #15943

* Dry out some tests that expect new or created models with specific attributes

See #15943

* Add a silly trailing comma to satisfy the style gods.

See #15943

* Update the DocBlock comments

See #15943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants