JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrlaravel['modules']->getModulePath($this->getModuleName()); $filePath = GenerateConfigReader::read('scopes')->getPath() ?? config('modules.paths.generator.model.path').'/Scopes'; return $path.$filePath.'/'.$this->getScopeName().'.php'; } protected function getTemplateContents(): string { $module = $this->laravel['modules']->findOrFail($this->getModuleName()); return (new Stub($this->getStubName(), [ 'CLASS_NAMESPACE' => $this->getClassNamespace($module), 'CLASS' => $this->getClassNameWithoutNamespace(), ]))->render(); } protected function getArguments(): array { return [ ['name', InputArgument::REQUIRED, 'The name of the scope class.'], ['module', InputArgument::OPTIONAL, 'The name of module will be used.'], ]; } protected function getOptions(): array { return [ ['force', 'f', InputOption::VALUE_NONE, 'su.'], ]; } protected function getScopeName(): array|string { return Str::studly($this->argument('name')); } private function getClassNameWithoutNamespace(): array|string { return class_basename($this->getScopeName()); } public function getDefaultNamespace(): string { $namespace = config('modules.paths.generator.model.path'); $parts = explode('/', $namespace); $models = end($parts); return $models.'\Scopes'; } protected function getStubName(): string { return '/scope.stub'; } }