controller) { CatchAdmin::getModuleControllerPath($this->module); } if ($this->models) { CatchAdmin::getModuleModelPath($this->module); } if ($this->requests) { CatchAdmin::getModuleRequestPath($this->module); } if ($this->database) { CatchAdmin::getModuleMigrationPath($this->module); CatchAdmin::getModuleSeederPath($this->module); } $this->createProvider(); $this->createRoute(); } /** * delete * * @return void */ public function delete(): void { } /** * create provider * * @return void */ protected function createProvider(): void { CatchAdmin::getModuleProviderPath($this->module); File::put( CatchAdmin::getModuleProviderPath($this->module).sprintf('%sServiceProvider.php', ucfirst($this->module)), Str::of( File::get(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'provider.stub') )->replace(['{Module}', '{module}'], [ucfirst($this->module), $this->module]) ); } /** * create route * * @return void */ protected function createRoute(): void { File::copy(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'route.stub', CatchAdmin::getModuleRoutePath($this->module)); } }