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.
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].
Hi,
Since the
migrate
command depends onmigrate:install
in order to prepare the database when first run, if running code that executes a call tomigrate
within tinker (on a fresh db) aSymfony/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!