Skip to content

Commit 48eddec

Browse files
committed
Added base methods for modules to inherit
1 parent 407e842 commit 48eddec

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/Support/ModuleServiceProvider.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,14 @@ protected function loadConfigFrom($path, $namespace)
101101
$config = $this->app['config'];
102102
$config->package($namespace, $path);
103103
}
104+
105+
public function getVersion(): string
106+
{
107+
return $this->composerPackage['versions'][0] ?? 'dev-unknown';
108+
}
109+
110+
public function __toString(): string
111+
{
112+
return $this->getIdentifier();
113+
}
104114
}

0 commit comments

Comments
 (0)