mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 22:24:03 +00:00
Update UpdateSyncedResource.php
This commit is contained in:
parent
0170ccc391
commit
88438d1786
1 changed files with 2 additions and 2 deletions
|
|
@ -139,9 +139,9 @@ class UpdateSyncedResource extends QueueableListener
|
||||||
{
|
{
|
||||||
if (! $model->getSyncedCreationAttributes()) {
|
if (! $model->getSyncedCreationAttributes()) {
|
||||||
// Creation attributes are not specified so create the model as 1:1 copy
|
// Creation attributes are not specified so create the model as 1:1 copy
|
||||||
// exclude the "id" parameter because we want to keep the id to handle by the target model to avoid duplication error
|
// exclude the "primary key" because we want primary key to handle by the target model to avoid duplication errors
|
||||||
$attributes = $model->getAttributes();
|
$attributes = $model->getAttributes();
|
||||||
unset($attributes['id']);
|
unset($attributes[$model->getKeyName()]);
|
||||||
|
|
||||||
return $attributes;
|
return $attributes;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue