Cleaned up DB usage in migration

This commit is contained in:
Dan Brown 2021-08-28 21:55:04 +01:00
parent 7d9de23a25
commit 0e7166f7f6
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -2,6 +2,7 @@
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class AddExportRolePermission extends Migration
{
@ -13,7 +14,7 @@ class AddExportRolePermission extends Migration
public function up()
{
// 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([
'name' => 'content-export',
'display_name' => 'Export Content',