Skip to content

Commit

Permalink
Remove faulty use of parent::boot()
Browse files Browse the repository at this point in the history
  • Loading branch information
KFoobar committed Dec 13, 2022
1 parent 6e0d984 commit b53d338
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Traits/HasUuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ trait HasUuid
*/
protected static function bootHasUuid()
{
parent::boot();

static::creating(function (Model $model) {
$model->addDefaultUuid($model);
});
Expand All @@ -25,6 +23,11 @@ protected static function bootHasUuid()
});
}

/**
* Adds a default uuid.
*
* @param \Illuminate\Database\Eloquent\Model $model
*/
protected function addDefaultUuid(Model $model)
{
if (empty($model->uuid)) {
Expand Down

0 comments on commit b53d338

Please sign in to comment.