mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
修正Create类的自动生成方法
This commit is contained in:
@@ -46,13 +46,13 @@ class Create {
|
|||||||
case 'Controller':// 控制器
|
case 'Controller':// 控制器
|
||||||
$filename = ucwords($val).$path;
|
$filename = ucwords($val).$path;
|
||||||
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
||||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path}\nclass {$filename} {\n}");
|
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} {\n}");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'Model': // 模型
|
case 'Model': // 模型
|
||||||
$filename = ucwords($val).$path;
|
$filename = ucwords($val).$path;
|
||||||
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
||||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path}\nclass {$filename} extends Model{\n}");
|
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} extends Model{\n}");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'View': // 视图
|
case 'View': // 视图
|
||||||
@@ -60,7 +60,7 @@ class Create {
|
|||||||
default:
|
default:
|
||||||
$filename = ucwords($val).$path;
|
$filename = ucwords($val).$path;
|
||||||
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
||||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path}\nclass {$filename} {\n}");
|
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} {\n}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user