-
Notifications
You must be signed in to change notification settings - Fork 646
Description
With a fresh project, the php artisan migrate is not possible. Error in the Role table:
Migrating: 2019_04_20_130706_setup_role_permissions
Spatie\Permission\Exceptions\RoleDoesNotExist : There is no role named admin
.
at /home/vagrant/code/laravue/vendor/spatie/laravel-permission/src/Exceptions/RoleDoesNotExist.php:11
7| class RoleDoesNotExist extends InvalidArgumentException
8| {
9| public static function named(string $roleName)
10| {
11| return new static("There is no role named
{$roleName}
.");
12| }
13|
14| public static function withId(int $roleId)
15| {
Exception trace:
1 Spatie\Permission\Exceptions\RoleDoesNotExist::named()
/home/vagrant/code/laravue/vendor/spatie/laravel-permission/src/Models/Role.php:87
2 Spatie\Permission\Models\Role::findByName()
/home/vagrant/code/laravue/database/migrations/2019_04_20_130706_setup_role_permissions.php:22