diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 226dab33d57c..db11b3a2e2b9 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -277,6 +277,7 @@ protected function bindPathsInContainer() { $this->instance('path', $this->path()); $this->instance('path.base', $this->basePath()); + $this->instance('path.resources', $this->resourcesPath()); $this->instance('path.lang', $this->langPath()); $this->instance('path.config', $this->configPath()); $this->instance('path.public', $this->publicPath()); @@ -350,6 +351,16 @@ public function useDatabasePath($path) return $this; } + /** + * Get the path to the resources folder. + * + * @return string + */ + public function resourcesPath() + { + return $this->basePath.DIRECTORY_SEPARATOR.'resources'; + } + /** * Get the path to the language files. * @@ -357,7 +368,7 @@ public function useDatabasePath($path) */ public function langPath() { - return $this->basePath.DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'lang'; + return $this->resourcesPath().DIRECTORY_SEPARATOR.'lang'; } /** diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index 8d99eca5d374..bf9fa3873922 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -653,7 +653,7 @@ function resolve($name, $parameters = []) */ function resource_path($path = '') { - return app()->basePath().DIRECTORY_SEPARATOR.'resources'.($path ? DIRECTORY_SEPARATOR.$path : $path); + return app()->resourcePath().($path ? DIRECTORY_SEPARATOR.$path : $path); } }