From 102b4a190e4ca9d676fdd78531499ce9ce62abe0 Mon Sep 17 00:00:00 2001 From: Andrey Diveev Date: Sat, 2 Feb 2019 04:49:34 +0100 Subject: [PATCH] allow env to control cache services, packages and routes paths --- src/Illuminate/Foundation/Application.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 075b0527bbbb..2a4355588bd6 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -885,7 +885,7 @@ public function shouldSkipMiddleware() */ public function getCachedServicesPath() { - return $this->bootstrapPath().'/cache/services.php'; + return $_ENV['APP_SERVICES_CACHE'] ?? $this->bootstrapPath().'/cache/services.php'; } /** @@ -895,7 +895,7 @@ public function getCachedServicesPath() */ public function getCachedPackagesPath() { - return $this->bootstrapPath().'/cache/packages.php'; + return $_ENV['APP_PACKAGES_CACHE'] ?? $this->bootstrapPath().'/cache/packages.php'; } /** @@ -935,7 +935,7 @@ public function routesAreCached() */ public function getCachedRoutesPath() { - return $this->bootstrapPath().'/cache/routes.php'; + return $_ENV['APP_ROUTES_CACHE'] ?? $this->bootstrapPath().'/cache/routes.php'; } /**