Created
July 15, 2017 12:01
-
-
Save nuqz/dd62c94e33e1cbffc1b4808a046e6e0a to your computer and use it in GitHub Desktop.
Getting dummy application namespace to develop Laravel packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// Insert this before throw in getNamespace() | |
foreach ((array) data_get($composer, 'autoload-dev.psr-4') as $namespace => $path) { | |
foreach ((array) $path as $pathChoice) { | |
if (realpath(app_path()) == realpath(base_path().'/../'.$pathChoice)) { | |
return $this->namespace = $namespace; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment