Nwidart\Modules\Process\Updater::update PHP Method

update() public method

Update the dependencies for the specified module by given the module name.
public update ( string $module )
$module string
    public function update($module)
    {
        $module = $this->module->findOrFail($module);
        $packages = $module->getComposerAttr('require', []);
        chdir(base_path());
        foreach ($packages as $name => $version) {
            $package = "\"{$name}:{$version}\"";
            $this->run("composer require {$package}");
        }
    }
Updater