generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
I can not use the excluded attributes with a soft-delete model at the moment.
How to reproduce the bug
When I set a property/attribute to the list of excluded attributes:
public static function excludedFromVersioning(): array
{
return ['password', 'api_token'];
}
like it is done in your documentation with a Model having:
use Illuminate\Database\Eloquent\SoftDeletes;
use SoftDeletes;
and doing a change like:
$model->fill(['api_token' => 'new value']);
$model->save();
Will create a new version instead of keeping the old one.
Package Version
2.0.0
PHP Version
8.3.0
Laravel Version
10.10
Which operating systems does this happen with?
Linux
Notes
I debugged through your code and the model got ['deleted_at'] => null
dirty values in all situations.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working