public static function getSrcPath($srcType, $package = null) { $dir_map = GeneratorsServiceProvider::getSrcTypePath(); if ($package) { $benchDir = $dir_map[$srcType]['bench']; $srcPath = $benchDir; if ($benchDir !== '') { $srcPath = str_replace('{{vendor/package}}', self::vendorPackage($package), $srcPath); $srcPath = str_replace('{{Vendor/Package}}', $package, $srcPath); $srcPath = 'workbench/' . $package . '/' . $srcPath; } } else { $appDir = $dir_map[$srcType]['app']; $srcPath = $appDir; } $srcPath = end_with(base_path(), '/') . $srcPath; return $srcPath; }