mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Caught old string helper function usage
Found by Laravel Shift Workbench
This commit is contained in:
@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user