diff --git a/src/Commands/MakeModelsCommand.php b/src/Commands/MakeModelsCommand.php index 1923033..fbdea9f 100644 --- a/src/Commands/MakeModelsCommand.php +++ b/src/Commands/MakeModelsCommand.php @@ -177,6 +177,8 @@ protected function replaceTokens($name, $table) if ($this->option("getset")) { $class = $this->replaceTokensWithSetGetFunctions($properties, $class); + } else { + $class = str_replace(['{{setters}}', '{{getters}}'], '', $class); } return $class; @@ -205,8 +207,8 @@ protected function replaceTokensWithSetGetFunctions($properties, $class) { '{{setters}}', '{{getters}}' ], [ - $setters, - $getters + $setters, + $getters ], $class); } diff --git a/src/stubs/model.stub b/src/stubs/model.stub index 6cfb19f..47bb670 100644 --- a/src/stubs/model.stub +++ b/src/stubs/model.stub @@ -1,8 +1,8 @@ -