diff --git a/src/Models/TeamworkTeam.php b/src/Models/TeamworkTeam.php index 2ab0bc9..b02de64 100755 --- a/src/Models/TeamworkTeam.php +++ b/src/Models/TeamworkTeam.php @@ -56,7 +56,7 @@ protected static function boot() static::creating(function ($model) { $model->uuid = (string)Uuid::uuid1(); $model->slug = Str::slug($model->name); - $model->owner_id = auth()->user()->getKey(); + $model->owner_id = $model->owner_id ?? auth()->user()->getKey(); }); static::updating(function ($model) {