Skip to content

[fix] models being reguarded when they are already unguarded#107

Open
fabio-ivona wants to merge 1 commit intompociot:masterfrom
fabio-ivona:patch-1
Open

[fix] models being reguarded when they are already unguarded#107
fabio-ivona wants to merge 1 commit intompociot:masterfrom
fabio-ivona:patch-1

Conversation

@fabio-ivona
Copy link

This PR will fix this code

        $model->unguard();
        $model->fill(unserialize($modelData));
        $model->exists = true;
        $model->reguard();

that reguards all models even if Model::unguard() has been called in a service provider

with the proposed fix, this won't happen anymore

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.

1 participant