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

[5.4] Always return collection from factory when amount is set #17493

Merged
merged 1 commit into from Jan 23, 2017

Conversation

JosephSilber
Copy link
Member

@JosephSilber JosephSilber commented Jan 23, 2017

Like we did for collections in #16865

I've gotten bitten by this so many times, since I always pass create a random number to I simulate real data.

@JosephSilber JosephSilber changed the title Always return collection from factory when amount is set [5.4] Always return collection from factory when amount is set Jan 23, 2017
@taylorotwell taylorotwell merged commit 1b5a0f0 into laravel:5.4 Jan 23, 2017
@taylorotwell
Copy link
Member

Please send PR to upgrade guide.

Copy link

@mateuszmalek mateuszmalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #17496

foreach ($results as $result) {
$result->save();
}
$result->each->save();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be $results I think? Otherwise it's an undefined variable.

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

Successfully merging this pull request may close these issues.

None yet

3 participants