Skip to content

Commit

Permalink
Change loadRoutesFrom to accept $attributes (#34866)
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 committed Oct 19, 2020
1 parent 0e33004 commit e719250
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Illuminate/Support/ServiceProvider.php
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit e719250

Please sign in to comment.