mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Cleaned up DB usage in migration
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class AddExportRolePermission extends Migration
|
class AddExportRolePermission extends Migration
|
||||||
{
|
{
|
||||||
@ -13,7 +14,7 @@ class AddExportRolePermission extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
// Create new templates-manage permission and assign to admin role
|
// Create new templates-manage permission and assign to admin role
|
||||||
$roles = \Illuminate\Support\Facades\DB::table('roles')->get('id');
|
$roles = DB::table('roles')->get('id');
|
||||||
$permissionId = DB::table('role_permissions')->insertGetId([
|
$permissionId = DB::table('role_permissions')->insertGetId([
|
||||||
'name' => 'content-export',
|
'name' => 'content-export',
|
||||||
'display_name' => 'Export Content',
|
'display_name' => 'Export Content',
|
||||||
|
Reference in New Issue
Block a user