Skip to content

Commit

Permalink
Merge pull request #73 from Vendin/up-use-composer-vendor-dir
Browse files Browse the repository at this point in the history
Use COMPOSER_VENDOR_DIR
  • Loading branch information
taylorotwell committed Aug 7, 2019
2 parents eb00755 + 6934210 commit ad571aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Console/TinkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ public function handle()
$shell->addCommands($this->getCommands());
$shell->setIncludes($this->argument('include'));

$path = $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor/composer/autoload_classmap.php';
if (isset($_ENV['COMPOSER_VENDOR_DIR'])) {
$path = $_ENV['COMPOSER_VENDOR_DIR'];
} else {
$path = $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor';
}

$path .= '/composer/autoload_classmap.php';

$loader = ClassAliasAutoloader::register($shell, $path);

Expand Down

0 comments on commit ad571aa

Please sign in to comment.