nunomaduro / laravel-console-menu

🔘 Beautiful PHP CLI menus. Is a php-school/cli-menu wrapper for Laravel/Artisan Console Commands
MIT License
802 stars 40 forks source link

Include w/ Laravel Zero by default? #2

Closed mikeerickson closed 6 years ago

mikeerickson commented 6 years ago

Nice package, curious if you are going to include out of box w/ Laravel Zero, or leave it up to users to include (I know I will include everytime)

nunomaduro commented 6 years ago

@mikeerickson This will be included on Laravel Zero 5.6 by default 👍

mikeerickson commented 6 years ago

@nunomaduro Seems this package is not auto loaded with Laravel Zero? Which (and where) should Service Provided be loaded?

  Exception trace:

  1   Illuminate\Console\Command::__call("menu")
      /Users/merickson/docker/localenv/m4-tools/app/Commands/DockerMenuCommand.php : 42

  2   App\Commands\DockerMenuCommand::handle()
      /Users/merickson/docker/localenv/m4-tools/vendor/illuminate/container/BoundMethod.php : 29

  Please use the argument -v to see more details.
mikeerickson commented 6 years ago

FWIW, did not have this same issue when using Laravel Console Task

mikeerickson commented 6 years ago

I have added the service provided to config/app.php providers array and it is working now, but thinking it should have autoloaded?

nunomaduro commented 6 years ago

@mikeerickson For now you must add it on the service provider into app.php. Maybe on the 5.6 we will support auto discovery.

mikeerickson commented 6 years ago

OK, well that is what I did. I was assuming it was auto discovery as there was no mention of adding the Service Provider (easy enough to add myself, could have avoided all of this stuff if it were mentioned :)