We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 512ed0f commit 2c03c66Copy full SHA for 2c03c66
src/MagicLink.php
@@ -5,6 +5,7 @@
5
use Carbon\Carbon;
6
use Illuminate\Database\Eloquent\Model;
7
use Illuminate\Database\QueryException;
8
+use Illuminate\Support\Facades\App;
9
use Illuminate\Support\Facades\Event;
10
use Illuminate\Support\Str;
11
use MagicLink\Actions\ActionInterface;
@@ -22,9 +23,9 @@ protected static function boot()
22
23
parent::boot();
24
25
static::creating(function ($model) {
- $model->id = method_exists(new Str(), 'uuid')
26
- ? (string) Str::uuid()
27
- : \Ramsey\Uuid\Uuid::uuid4();
+ $model->id = preg_match('/5\.5\.*/', App::version())
+ ? (string) \Ramsey\Uuid\Uuid::uuid4()
28
+ : (string) Str::uuid();
29
});
30
}
31
0 commit comments