ho creato un comando con Artisancomando non è definito eccezione
$ php artisan command:make NeighborhoodCommand
Questo ha creato il file app/commands/NeighborhoodCommand.php
frammento del codice. Ho modificato il valore name
e riempito nella funzione fire()
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class NeighborhoodCommand extends Command {
protected $name = 'neighborhood';
public function fire()
{
// my code
}
}
Ma poi quando si tenta di eseguire il comando con
$ php artisan neighborhood
ottengo questo errore:
[InvalidArgumentException]
Command "neighborhood" is not defined.
Plus per essere umili e una buona risposta. Mi è successo 1000 volte! –