From 60c9e005fa25d5d707fe9451d3ddb161a038c5bb Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Sun, 20 Nov 2016 10:28:59 +1100 Subject: [PATCH 1/2] Routes function. --- src/Illuminate/Support/ServiceProvider.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Illuminate/Support/ServiceProvider.php b/src/Illuminate/Support/ServiceProvider.php index 33f68a37c426..a4d8cf66b6dd 100755 --- a/src/Illuminate/Support/ServiceProvider.php +++ b/src/Illuminate/Support/ServiceProvider.php @@ -102,6 +102,19 @@ protected function loadMigrationsFrom($paths) }); } + /** + * Register routes. + * + * @param string $path + * @return void + */ + protected function loadRoutesFrom($path) + { + if (!$this->app->routesAreCached()) { + require $path; + } + } + /** * Register paths to be published by the publish command. * From b2528a524bee682935fcabb72ab036ba8e97eebd Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Sun, 20 Nov 2016 10:31:32 +1100 Subject: [PATCH 2/2] Style fix --- src/Illuminate/Support/ServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Support/ServiceProvider.php b/src/Illuminate/Support/ServiceProvider.php index a4d8cf66b6dd..c8c446cbe18f 100755 --- a/src/Illuminate/Support/ServiceProvider.php +++ b/src/Illuminate/Support/ServiceProvider.php @@ -110,7 +110,7 @@ protected function loadMigrationsFrom($paths) */ protected function loadRoutesFrom($path) { - if (!$this->app->routesAreCached()) { + if (! $this->app->routesAreCached()) { require $path; } }