Closed kaseka closed 8 years ago
Import the Illuminate\Support\Pluralizer
class, then replace the line:
$name = rtrim($this->parseName($prefix . $class), 's');
with:
$name = Pluralizer::singular($this->parseName($prefix . $class));
Worked perfectly for me.
This library automatically remove all "s" from the end of a table name. It's good idea, but this option should be controlled by some command line parameter. For example if we got table called "address" then class generated is called "addre" - and that's the case which I had.
If I good understand the code it's at MakeModelsCommand:147:
$name = rtrim($this->parseName($prefix . $class), 's');
Would You mind to make such change? Regards