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.8] HasAttributes::originalIsEquivalent to public #26391

Merged

Conversation

pablorsk
Copy link
Contributor

@pablorsk pablorsk commented Nov 5, 2018

HasAttributes::originalIsEquivalent function is great for observers... For example, currently, on saving() event:

    public function saving($product) {
        if ($product->stock !== $product->getOriginal('stock')) {
            // do stuff
        }
    }

After:

    public function saving($product) {
        if (!$product->originalIsEquivalent('stock')) {
            // do stuff
        }
    }

Its possible to change this? Or is there a reason to keep it that way?

Closes #26383, Related with PR #26384

@taylorotwell taylorotwell merged commit e2970e8 into laravel:master Nov 5, 2018
@GrahamCampbell GrahamCampbell changed the title HasAttributes::originalIsEquivalent to public [5.8] HasAttributes::originalIsEquivalent to public Nov 5, 2018
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.

2 participants