2

I'm trying to install the package Laravel-permission v5 for a project in Laravel 8.

Following the instructions at the documentation, I runned

composer require spatie/laravel-permission

and to be able to migrate the permission tables I executed:

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"

Instantly, in the file database/migrations/create_permission_tables.php it gives me the error

Undefined type 'Spatie\Permission\PermissionRegistrar

What can I do? I'm new in Laravel

abelarda
  • 45
  • 1
  • 6

2 Answers2

1

Did you import it in config/app.php ??

Try this:

 php artisan optimize:clear
 # or
 php artisan config:clear

 php artisan migrate
Somar kn
  • 119
  • 1
  • 9
0

you need to recharge your vscode window:

tape: ctrl + shift + p pass : Developer:Reload Window

finish with that particular problem