Skip to content

Commit 512ed0f

Browse files
committed
fix l5.5 uuid
1 parent abc7bd2 commit 512ed0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/MagicLink.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ protected static function boot()
2222
parent::boot();
2323

2424
static::creating(function ($model) {
25-
$model->id = (string) Str::uuid();
25+
$model->id = method_exists(new Str(), 'uuid')
26+
? (string) Str::uuid()
27+
: \Ramsey\Uuid\Uuid::uuid4();
2628
});
2729
}
2830

0 commit comments

Comments
 (0)