Skip to content

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