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

Can't detect if in the model function beforesave the object is soft deleted #159

Open
victormatuk opened this issue Nov 11, 2020 · 1 comment

Comments

@victormatuk
Copy link

I tried to detect in afterSave if the model was soft deleted but i can't because it always return true even I deleted it

public function afterSave($insert, $changedAttributes) { var_dump($this->_rt_softdelete); parent::afterSave($insert, $changedAttributes); }

@drew1two
Copy link
Contributor

drew1two commented Mar 3, 2021

I found that _rt_softdelete was 'always' set to true and _rt_softrestore 'always' set to false. To detect the change I'd check by using $this->deleted_by

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