Skip to content

[12.x] Preserve "previous" model state #55729

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

Merged
merged 6 commits into from
May 15, 2025
Merged

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented May 14, 2025

Based on #53901 but instead of mimicking $original, $previous instead follows $changes.

@crynobone crynobone force-pushed the 12/model-get-previous branch from fde8873 to 466c8f2 Compare May 14, 2025 01:44
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone force-pushed the 12/model-get-previous branch from c9431dd to 6f11672 Compare May 14, 2025 01:49
@crynobone crynobone marked this pull request as ready for review May 14, 2025 01:51
crynobone added a commit to orchestral/sidekick that referenced this pull request May 14, 2025
retrieve previous original state.

Will need to depends on laravel/framework#55729

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone changed the title Preserve "previous" model state [12.x] Preserve "previous" model state May 14, 2025
crynobone and others added 4 commits May 14, 2025 12:24
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@taylorotwell taylorotwell merged commit a039725 into 12.x May 15, 2025
60 checks passed
@taylorotwell taylorotwell deleted the 12/model-get-previous branch May 15, 2025 22:16
crynobone added a commit to orchestral/sidekick that referenced this pull request May 15, 2025
… retrieve previous original state. (#40)

* Support `Illuminate\Database\Eloquent\Model::getPrevious()` method to
retrieve previous original state.

Will need to depends on laravel/framework#55729

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* Update Watcher.php

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

* wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

---------

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
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