Nwidart\Modules\Repository::getModulePath PHP Méthode

getModulePath() public méthode

Get module path for a specific module.
public getModulePath ( $module ) : string
$module
Résultat string
    public function getModulePath($module)
    {
        try {
            return $this->findOrFail($module)->getPath() . '/';
        } catch (ModuleNotFoundException $e) {
            return $this->getPath() . '/' . Str::studly($module) . '/';
        }
    }

Usage Example

 /**
  * Get destination path.
  *
  * @return string
  */
 public function getDestinationPath()
 {
     if ($this->path) {
         return $this->path;
     }
     return $this->repository->getModulePath($this->getModuleName());
 }