<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;

class RoleSeeder extends Seeder
{
    public function run(): void
    {
        $ids            = Permission::pluck('id')->toArray();
        $superAdminRole = Role::updateOrCreate(['name' => 'superadmin'], ['name' => 'superadmin']);
        $superAdminRole->syncPermissions($ids);
    }
}
