mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 13:34:04 +00:00
update comments
This commit is contained in:
parent
62c9516ec1
commit
d798e3504a
1 changed files with 2 additions and 1 deletions
|
|
@ -112,7 +112,6 @@ class UpdateSyncedResource extends QueueableListener
|
|||
if ($localModel) {
|
||||
$localModel->update($syncedAttributes);
|
||||
} else {
|
||||
// When creating, we use all columns, not just the synced ones.
|
||||
$localModel = $localModelClass::create($this->getAttributesForCreation($eventModel));
|
||||
}
|
||||
|
||||
|
|
@ -126,6 +125,8 @@ class UpdateSyncedResource extends QueueableListener
|
|||
$attributes = $model->getAttributes();
|
||||
|
||||
if ($model->getResourceCreationAttributes()) {
|
||||
// If developer provided key-value array, we'll use them as it
|
||||
// If developer provided plain array, we'll use them to pick model attributes
|
||||
$attributes = Arr::isAssoc($model->getResourceCreationAttributes()) ? $model->getResourceCreationAttributes() : $model->only($model->getResourceCreationAttributes());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue