Nwidart\Modules\Generators\ModuleGenerator::generate PHP Method

generate() public method

Generate the module.
public generate ( )
    public function generate()
    {
        $name = $this->getName();
        if ($this->module->has($name)) {
            if ($this->force) {
                $this->module->delete($name);
            } else {
                $this->console->error("Module [{$name}] already exist!");
                return;
            }
        }
        $this->generateFolders();
        $this->generateFiles();
        if (!$this->plain) {
            $this->generateResources();
        }
        $this->console->info("Module [{$name}] created successfully.");
    }