From 10f86d4253ad14491f419c1ef27c86a57fcad7ad Mon Sep 17 00:00:00 2001 From: printempw Date: Sat, 14 Jan 2017 18:42:53 +0800 Subject: [PATCH] add detection for vendor existence --- bootstrap/autoload.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 38301379..b3af0926 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -14,7 +14,11 @@ define('LARAVEL_START', microtime(true)); | */ -require __DIR__.'/../vendor/autoload.php'; +if (file_exists($autoload = __DIR__.'/../vendor/autoload.php')) { + require $autoload; +} else { + exit("No vendor folder found. Have you installed the dependencies with composer?"); +} /* |--------------------------------------------------------------------------