3

I'm using entrust for roles and I have to make the migrations, but when I want to execute php artisan entrust:migration I get this error

[Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the "entrust" namespace.

"It will generate the _entrust_setup_tables.php migration."

What can I do? Thank you!

meluluji
  • 319
  • 1
  • 2
  • 15

4 Answers4

2

First clean the cached configure files and rerun php artisan vendor:publish

Then run php artisan entrust:migration

spassas
  • 4,778
  • 2
  • 31
  • 39
2

it may be a bit late, but for the one who facing this problem when using entrust

just run php artisan config:clear

Soul Coder
  • 774
  • 3
  • 16
  • 40
0

Make sure you have added both the provider and the alias in the config/app.php file and save it

Add to the providers array:

Zizaco\Entrust\EntrustServiceProvider::class,

Add to the aliases array:

'Entrust'   => Zizaco\Entrust\EntrustFacade::class,

And after that, try the php artisan entrust:migration again

buzkall
  • 927
  • 11
  • 14
0

I know this is an old issue but I had the same problem and the issue was that my configs were cached. So you'll need to clear your configs cache and run it.

You can clear the cache by using the following command php artisan config:cache

Note that if you have never used this command and your configs are not cache, you shouldn't do this on your local/dev environment because you might have this kind of issue.

I hope this helps.

MUHAMMAD USMAN
  • 149
  • 2
  • 6