mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 21:34:03 +00:00
Remove unnecessary check
This commit is contained in:
parent
9155e32ba8
commit
d7305952e0
1 changed files with 3 additions and 3 deletions
|
|
@ -20,10 +20,10 @@ trait ResourceSyncing
|
||||||
});
|
});
|
||||||
|
|
||||||
static::creating(function (self $model) {
|
static::creating(function (self $model) {
|
||||||
$key = $model->getGlobalIdentifierKeyName();
|
$keyName = $model->getGlobalIdentifierKeyName();
|
||||||
|
|
||||||
if (! $model->getAttribute($key) && app()->bound(UniqueIdentifierGenerator::class) && $model->isSyncEnabled()) {
|
if (! $model->getAttribute($keyName) && app()->bound(UniqueIdentifierGenerator::class)) {
|
||||||
$model->setAttribute($key, app(UniqueIdentifierGenerator::class)->generate($model));
|
$model->setAttribute($keyName, app(UniqueIdentifierGenerator::class)->generate($model));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue