laravel/tinker

Add migrate:install to white listed commands

michaelhume opened this issue · 1 comments

Hi,

Since the migrate command depends on migrate:install in order to prepare the database when first run, if running code that executes a call to migrate within tinker (on a fresh db) a Symfony/Component/Console/Exception/NamespaceNotFoundException with message 'There are no commands defined in the "migrate" namespace.' is the result.

Adding migrate:install to the whitelisted commands resolves this.

N.B. Adding \Illuminate\Database\Console\Migrations\InstallCommand::class to config/tinker.php results in a BindingResolutionException: Target [Illuminate\Database\Migrations\MigrationRepositoryInterface] is not instantiable while building [Illuminate\Database\Console\Migrations\InstallCommand].

Thanks for all you do!

I don't think this belongs in that list but you can always attempt a pr to see if Taylor would accept it. Thanks