Caffeinated\Modules\Console\GeneratorCommand::parseName PHP Method

parseName() protected method

Parse the name and format according to the root namespace.
protected parseName ( string $name ) : string
$name string
return string
    protected function parseName($name)
    {
        $rootNamespace = config('modules.namespace');
        if (Str::startsWith($name, $rootNamespace)) {
            return $name;
        }
        if (Str::contains($name, '/')) {
            $name = str_replace('/', '\\', $name);
        }
        return $this->parseName($this->getDefaultNamespace(trim($rootNamespace, '\\')) . '\\' . $name);
    }
GeneratorCommand