M
M
Mykola Ivashchuk2018-04-24 14:36:01
Laravel
Mykola Ivashchuk, 2018-04-24 14:36:01

Why don't console commands work?

There is a command:

class DownloadSource extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'convertor:download';

While doing
php artisan converter:download

Mistake
There are no commands defined in the "convertor" namespace.

I registered the command in App\Console\Kernal:
class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        DownloadSource::class,
        ConvertSource::class,
        ConvertSourceXML::class,
        ConvertSourceYML::class
    ];

Laravel 5.6

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mykola Ivashchuk, 2018-04-25
@mykolaim

I figured it out, the error was in the environment itself, according to the code, everything was valid anyway.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question