-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Describe the bug
When updating a model, Laravel first checks if the updated value differs from model's.
If it does, then it will execute a update query. If it doesn't, then a update query won't be executed.
To Reproduce
Steps to reproduce the behavior:
$dateRange = new TimestampRange(
Carbon::now()->startOfDay();
Carbon::now()->endOfDay();
);
$model = Model::create([
'timestampRange' => $dateRange
]);
$model->update([
'timestampRange' => $dateRange
]);
dd($model->getChanges()); // <-- This should be empty, but it's not.
Maybe something related with this:
dd($model->timestampRange->forSql(), $dateRange->forSql());

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels