From 81b374b9e768344a0b6ceba6e6ea03ce14877ba6 Mon Sep 17 00:00:00 2001 From: imanghafoori Date: Sat, 17 Oct 2020 08:58:20 +0330 Subject: [PATCH] Change loadRoutesFrom to accept $attributes --- src/Illuminate/Support/ServiceProvider.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Support/ServiceProvider.php b/src/Illuminate/Support/ServiceProvider.php index 1f361b1dc982..ed5fcb3b8a2f 100755 --- a/src/Illuminate/Support/ServiceProvider.php +++ b/src/Illuminate/Support/ServiceProvider.php @@ -8,6 +8,7 @@ use Illuminate\Contracts\Foundation\CachesRoutes; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Database\Eloquent\Factory as ModelFactory; +use Illuminate\Support\Facades\Route; use Illuminate\View\Compilers\BladeCompiler; abstract class ServiceProvider @@ -136,12 +137,14 @@ protected function mergeConfigFrom($path, $key) * Load the given routes file if routes are not already cached. * * @param string $path + * @param array $attributes + * * @return void */ - protected function loadRoutesFrom($path) + protected function loadRoutesFrom($path, array $attributes = []) { if (! ($this->app instanceof CachesRoutes && $this->app->routesAreCached())) { - require $path; + Route::group($attributes, $path); } }