Let's say I'm coding a command. How would I stop it completely in the middle of it running?
Example:
public function handle()
{
if (!$this->good_times) {
$this->error('Bad times');
$this->exit();
}
// continue command stuff
}
I have tried:
throw new RuntimeException('Bad times');
But that dumps a bunch of ugliness in the terminal.
return true
should be changed toreturn 0
. But stil, only returning something (0 or 1) would do the trick. – Cajun