Skip to content

Commit 6446bde

Browse files
Merge remote-tracking branch 'origin/dev'
2 parents 6a372a5 + 88f3045 commit 6446bde

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Concerns/HasSnapshot.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function bootHasSnapshot()
8080

8181
if($snapshot){
8282
foreach (array_keys($model->snapshotSavingData) as $field) { // whether to update snapshot fields individually
83-
if (!in_array($field, $model->getColumns()) && isset($model->{$field})) {
83+
if (!in_array($field, $model->getTableColumns()) && isset($model->{$field})) {
8484
$shouldUpdateSnapshot = !$snapshotSourceChanged ||
8585
json_encode($model->snapshotSavingData[$field] ?? null) !== json_encode($model->{$field});
8686

src/Concerns/SnapshotFields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static function getSnapshotableSourceAttributes(): array
7676
$sourceClass = new (static::getSnapshotSourceClass());
7777

7878
$sourceFillable = $sourceClass->getFillable();
79-
// $sourceColumns = $sourceClass->getColumns();
79+
// $sourceColumns = $sourceClass->getTableColumns();
8080
$sourceMutatedAttributes = $sourceClass->getMutatedAttributes();
8181
$sourceTimestampColumns = $sourceClass->getTimestampColumns();
8282

tests/SnapshotTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function test_manage_eloquent_trait()
4444
'name' => 'Lorem',
4545
]);
4646

47-
$this->assertTrue(method_exists($model, 'getColumns'), 'ManageEloquent Trait does not have "getColumns" method');
47+
$this->assertTrue(method_exists($model, 'getTableColumns'), 'ManageEloquent Trait does not have "getTableColumns" method');
4848
$this->assertTrue(method_exists($model, 'definedRelations'), 'ManageEloquent Trait does not have "definedRelations" method');
4949
}
5050

0 commit comments

Comments
 (0)