Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB:SEED ERROR #111

Open
joaovelozo opened this issue Feb 6, 2020 · 2 comments
Open

DB:SEED ERROR #111

joaovelozo opened this issue Feb 6, 2020 · 2 comments

Comments

@joaovelozo
Copy link

Spatie\Permission\Exceptions\PermissionAlreadyExists : A edit listing permission already exists for guard web.

at C:\projetossaida\guia2\vendor\spatie\laravel-permission\src\Exceptions\PermissionAlreadyExists.php:11
7| class PermissionAlreadyExists extends InvalidArgumentException
8| {
9| public static function create(string $permissionName, string $guardName)
10| {

11| return new static("A {$permissionName} permission already exists for guard {$guardName}.");
12| }
13| }
14|

Exception trace:

1 Spatie\Permission\Exceptions\PermissionAlreadyExists::create("edit listing", "web")
C:\projetossaida\guia2\vendor\spatie\laravel-permission\src\Models\Permission.php:42

2 Spatie\Permission\Models\Permission::create(["edit listing", "web"])
C:\projetossaida\guia2\database\seeds\RolesAndPermissionsSeeder.php:20

@savornicesei
Copy link

Please see my answer here.

@techguydev
Copy link

techguydev commented Apr 5, 2020

Hi,

As @savornicesei says,this is what you have to do to make it work:

1 - php artisan migrate:rollback
2- php artisan lada-cache:disable
3 -php artisan migrate
4- php artisan db:seed

Then you can login in the browser as admin with the defaults credentials:

user:admin@example.com
password:changeme

And Voilá it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants