Skip to content

Commit 81ac0a4

Browse files
authored
Merge pull request #10 from Clayboy/master
Laravel 6 support (helper function deprecated)
2 parents e144724 + f67a4a1 commit 81ac0a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Models/ApiKey.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Database\Eloquent\Model;
66
use Illuminate\Database\Eloquent\SoftDeletes;
7+
use Illuminate\Support\Str;
78

89
class ApiKey extends Model
910
{
@@ -76,7 +77,7 @@ public static function boot()
7677
public static function generate()
7778
{
7879
do {
79-
$key = str_random(64);
80+
$key = Str::random(64);
8081
} while (self::keyExists($key));
8182

8283
return $key;

0 commit comments

Comments
 (0)