- enhanced setup:dev script

- refactored shared token creation
This commit is contained in:
Peter Papp
2021-03-15 07:51:01 +01:00
parent 749bc4ae83
commit 6b67f861c3
5 changed files with 187 additions and 44 deletions
+3 -2
View File
@@ -43,8 +43,9 @@ class Share extends Model
{
parent::boot();
static::creating(function ($model) {
$model->id = (string)Str::uuid();
static::creating(function ($shared) {
$shared->id = (string)Str::uuid();
$shared->token = Str::random(16);
});
}
}