mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 04:34:02 +00:00
wip
This commit is contained in:
parent
3e514461ca
commit
f02aa1a6f2
3 changed files with 9 additions and 9 deletions
|
|
@ -121,12 +121,12 @@ class UpdateSyncedResource extends QueueableListener
|
|||
});
|
||||
}
|
||||
|
||||
function getResourceCreationAttributes(Syncable $model): array
|
||||
protected function getResourceCreationAttributes(Syncable $model): array
|
||||
{
|
||||
$attributes = $model->getAttributes();
|
||||
|
||||
if ($model->getResourceCreationAttributes()) {
|
||||
// If array is key-value, We assume default values are provided
|
||||
// If function returned array is key-value, We assume default values are provided
|
||||
// if array is plain values, fetch attributes from model
|
||||
$attributes = Arr::isAssoc($model->getResourceCreationAttributes()) ? $model->getResourceCreationAttributes() : $model->only($model->getResourceCreationAttributes());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue