argument('name'); switch($proj){ case "module": $this->cdir(); break; case "controller": $this->cController(); break; case "model": $this->cModel(); break; case "lib": $this->cLib(); break; default: break; } } protected function cLib(){ $app=$this->argument('module'); $app=ucfirst($app); $module=$this->root."/module/"; $path=$module."/Lib"."/"; if(!File::exists($path)){ File::makeDirectory($path); } $path=$module."/Lib"."/".ucfirst($app).".php"; $content="argument('module'); $app=$this->argument('app'); $proj=ucfirst($proj); $module=$this->root."/module/".$proj."/"; $path=$module."/Controller"."/".ucfirst($app).".php"; $content="argument('module'); $proj=ucfirst($proj); $module=$this->root."/module/".$proj."/"; $path=$module."/Controller"."/BaseController.php"; $content="_init();".chr(9).chr(13). " }".chr(9).chr(13). "}"; File::put($path,$content); } protected function cBaseModel() { $proj=$this->argument('module'); $proj=ucfirst($proj); $module=$this->root."/module/".$proj."/"; $path=$module."/Model"."/BaseModel.php"; $content="argument('module'); $model=$this->argument('app'); $proj=ucfirst($proj); $model=ucfirst($model); $module=$this->root."/module/".$proj."/"; $path=$module."/Model"."/$model.php"; $content="argument('module'); $proj=ucfirst($proj); $module=$this->root."/module/".$proj."/"; File::makeDirectory($module); $path=$module."/Model"."/"; File::makeDirectory($path); $path=$module."/Controller"."/"; File::makeDirectory($path); $path=$this->root."/resources/views/".lcfirst($proj)."/"; File::makeDirectory($path); $this->cBaseController(); $this->cBaseModel(); } }