Skip to content

Commit

Permalink
Autoload for root folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Rus0 committed Oct 26, 2018
1 parent eb27ac2 commit 2054fab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
/* 'composer install' validation */
if (file_exists($vendorAutoload)) {
$composerAutoloader = include $vendorAutoload;
} else if (file_exists("{$vendorDir}/autoload.php")) {
$vendorAutoload = "{$vendorDir}/autoload.php";
$composerAutoloader = include $vendorAutoload;
} else {
throw new \Exception(
'Vendor autoload is not found. Please run \'composer install\' under application root directory.'
Expand Down

0 comments on commit 2054fab

Please sign in to comment.