File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 99-  [ #56  ] ( https://github.com/mineadmin/components/pull/56 )  Splitting modular components
1010-  [ #58  ] ( https://github.com/mineadmin/components/pull/58 )  New base Secure Authentication Component
1111-  [ #59  ] ( https://github.com/mineadmin/components/pull/59 )  Add components for secure access control
12- -  -  [ #61  ] ( https://github.com/mineadmin/components/pull/61 )  Provide associative access to exported path attributes
12+ -  [ #61  ] ( https://github.com/mineadmin/components/pull/61 )  Provide associative access to exported path attributes
13+ -  [ #63  ] ( https://github.com/mineadmin/components/pull/63 )  Fixes the failure to generate files when certain words (category) are pluralized.
Original file line number Diff line number Diff line change 99-  [ #56  ] ( https://github.com/mineadmin/components/pull/56 )  拆分` 模块化 ` 组件
1010-  [ #58  ] ( https://github.com/mineadmin/components/pull/58 )  新增基础的 安全认证组件
1111-  [ #59  ] ( https://github.com/mineadmin/components/pull/59 )  添加安全访问控制组件
12- -  [ #61  ] ( https://github.com/mineadmin/components/pull/61 )  为导出 path 属性提供关联访问方式
12+ -  [ #61  ] ( https://github.com/mineadmin/components/pull/61 )  为导出 path 属性提供关联访问方式
13+ -  [ #63  ] ( https://github.com/mineadmin/components/pull/63 )  修复某些单词(category)复数情况下无法生成文件
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ public function generator(): void
106106
107107        if  ($ application ->run ($ input , $ output ) === 0 ) {
108108            // 对模型文件处理 
109+             $ modelName  = \Hyperf \Stringable \Str::singular ($ modelName );
109110            if  ($ modelName [strlen ($ modelName ) - 1 ] == 's '  && $ modelName [strlen ($ modelName ) - 2 ] != 's ' ) {
110111                $ oldName  = Str::substr ($ modelName , 0 , strlen ($ modelName ) - 1 );
111112                $ oldPath  = BASE_PATH  . "/app/ {$ module }/Model/ {$ oldName }.php " ;
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments