Caught old string helper function usage
Found by Laravel Shift Workbench
This commit is contained in:
parent
c32b315cd7
commit
5c7eb0df57
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ class CreateJointPermissionsTable extends Migration
|
||||||
|
|
||||||
// Ensure unique name
|
// Ensure unique name
|
||||||
while (DB::table('roles')->where('name', '=', $publicRoleData['display_name'])->count() > 0) {
|
while (DB::table('roles')->where('name', '=', $publicRoleData['display_name'])->count() > 0) {
|
||||||
$publicRoleData['display_name'] = $publicRoleData['display_name'] . str_random(2);
|
$publicRoleData['display_name'] = $publicRoleData['display_name'] . Str::random(2);
|
||||||
}
|
}
|
||||||
$publicRoleId = DB::table('roles')->insertGetId($publicRoleData);
|
$publicRoleId = DB::table('roles')->insertGetId($publicRoleData);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue