Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- [#56](https://github.com/mineadmin/components/pull/56) Splitting modular components
- [#58](https://github.com/mineadmin/components/pull/58) New base Secure Authentication Component
- [#59](https://github.com/mineadmin/components/pull/59) Add components for secure access control
- - [#61](https://github.com/mineadmin/components/pull/61) Provide associative access to exported path attributes
- [#61](https://github.com/mineadmin/components/pull/61) Provide associative access to exported path attributes
- [#63](https://github.com/mineadmin/components/pull/63) Fixes the failure to generate files when certain words (category) are pluralized.
3 changes: 2 additions & 1 deletion CHANGELOG-2.0.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- [#56](https://github.com/mineadmin/components/pull/56) 拆分`模块化`组件
- [#58](https://github.com/mineadmin/components/pull/58) 新增基础的 安全认证组件
- [#59](https://github.com/mineadmin/components/pull/59) 添加安全访问控制组件
- [#61](https://github.com/mineadmin/components/pull/61) 为导出 path 属性提供关联访问方式
- [#61](https://github.com/mineadmin/components/pull/61) 为导出 path 属性提供关联访问方式
- [#63](https://github.com/mineadmin/components/pull/63) 修复某些单词(category)复数情况下无法生成文件
1 change: 1 addition & 0 deletions src/mine-generator/src/ModelGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function generator(): void

if ($application->run($input, $output) === 0) {
// 对模型文件处理
$modelName = \Hyperf\Stringable\Str::singular($modelName);
if ($modelName[strlen($modelName) - 1] == 's' && $modelName[strlen($modelName) - 2] != 's') {
$oldName = Str::substr($modelName, 0, strlen($modelName) - 1);
$oldPath = BASE_PATH . "/app/{$module}/Model/{$oldName}.php";
Expand Down