We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a4e265e + 2eba084 commit f0144eaCopy full SHA for f0144ea
src/Traits/GeneratorReplacers.php
@@ -16,7 +16,14 @@ trait GeneratorReplacers
16
protected function replaceModelName(&$stub, $modelName)
17
{
18
$englishSingle = $this->modelNamePlainEnglish($modelName);
19
- $plural = str_plural($englishSingle);
+
20
+ //allow custom plurals in the case that str_plural doesn't work fine in your language
21
+ if(config('codegenerator.plurals') && array_key_exists($englishSingle,config('codegenerator.plurals'))){
22
+ $plural = config('codegenerator.plurals')[$englishSingle];
23
+ }
24
+ else{
25
+ $plural = str_plural($englishSingle);
26
27
28
$stub = $this->strReplace('model_name', $englishSingle, $stub);
29
$stub = $this->strReplace('model_name_flat', strtolower($modelName), $stub);
0 commit comments