芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/vendor/barryvdh/FactoryMakeCommand.php
laravel['modules']->findOrFail($this->getModuleName()); return (new Stub('/factory.stub', [ 'NAMESPACE' => $this->getClassNamespace($module), 'NAME' => $this->getModelName(), 'MODEL_NAMESPACE' => $this->getModelNamespace(), ]))->render(); } /** * @return mixed */ protected function getDestinationFilePath() { $path = $this->laravel['modules']->getModulePath($this->getModuleName()); $factoryPath = GenerateConfigReader::read('factory'); return $path . $factoryPath->getPath() . '/' . $this->getFileName(); } /** * @return string */ private function getFileName() { return Str::studly($this->argument('name')) . 'Factory.php'; } /** * @return mixed|string */ private function getModelName() { return Str::studly($this->argument('name')); } /** * Get default namespace. * * @return string */ public function getDefaultNamespace(): string { $module = $this->laravel['modules']; return $module->config('paths.generator.factory.namespace') ?: $module->config('paths.generator.factory.path'); } /** * Get model namespace. * * @return string */ public function getModelNamespace(): string { return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $this->laravel['modules']->config('paths.generator.model.path', 'Entities'); } }