1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 16:34:04 +00:00

Update UpdateSyncedResource.php

This commit is contained in:
Samuel Štancl 2022-10-05 09:36:47 +02:00 committed by GitHub
parent 134cb291ea
commit 05ed7214b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,8 @@ use Stancl\Tenancy\Events\SyncedResourceChangedInForeignDatabase;
use Stancl\Tenancy\Events\SyncedResourceSaved;
use Stancl\Tenancy\Exceptions\ModelNotSyncMasterException;
// todo@v4 review all code related to resource syncing
class UpdateSyncedResource extends QueueableListener
{
public static bool $shouldQueue = false;
@ -154,7 +156,7 @@ class UpdateSyncedResource extends QueueableListener
return array_merge($model->only(array_merge($model->getSyncedAttributeNames(), $attributes)), $defaultValues);
}
// Developer provided the attribute names, so we'd use them to pick model attributes
// Developer provided the attribute names, so we'll use them to pick model attributes
return $model->only($model->getSyncedCreationAttributes());
}