diff --git a/GeneratorCommand.php b/GeneratorCommand.php index 3dd7774..92f9787 100644 --- a/GeneratorCommand.php +++ b/GeneratorCommand.php @@ -56,7 +56,7 @@ public function handle() // First we will check to see if the class already exists. If it does, we don't want // to create the class and overwrite the user's code. So, we will bail out so the // code is untouched. Otherwise, we will continue generating this class' files. - if ($this->alreadyExists($this->getNameInput())) { + if ((! $this->hasOption('force') || ! $this->option('force')) && $this->alreadyExists($this->getNameInput())) { $this->error($this->type.' already exists!'); return false;