I made a new command with:
php artisan make:console CrawlData
Then I changed two variables:
protected $signature = 'make:crawl'; protected $description = 'My crawling command';
The problem is that when I run:
php artisan make:crawl
[Symfony\Component\Console\Exception\CommandNotFoundException] Command "make:crawl" is not defined.
You also need to register the command in the
App\Console\Kernel class for it to be recognized:
protected $commands = [ ... \App\Console\Commands\CrawlData::class, ];
You can read more about that in the Registering Commands documentation.
Starting with Laravel 5.5 commands in
app/Console/Commandsare automatically registered.