protected function getPath($name)
{
$slug = $this->argument('slug');
// take everything after the module name in the given path (ignoring case)
$key = array_search(strtolower($slug), explode('\\', strtolower($name)));
if ($key === false) {
$newPath = str_replace('\\', '/', $name);
} else {
$newPath = implode('/', array_slice(explode('\\', $name), $key + 1));
}
return module_path($slug, "{$newPath}.php");
}