Skip to content

Commit b248625

Browse files
Merge pull request #35 from limosa-io/feature/allow-not-registering-routes
allow not registering routes
2 parents 4fe4bf2 + e52905e commit b248625

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/PassportServiceProvider.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,13 @@ protected function registerRoutes()
179179
{
180180
parent::registerRoutes();
181181

182-
Route::group([
183-
'namespace' => 'Laravel\Passport\Http\Controllers',
184-
], function () {
185-
$this->loadRoutesFrom(__DIR__ . '/../src/routes/web.php');
186-
});
182+
if (Passport::$registersRoutes) {
183+
Route::group([
184+
'namespace' => 'Laravel\Passport\Http\Controllers',
185+
], function () {
186+
$this->loadRoutesFrom(__DIR__ . '/../src/routes/web.php');
187+
});
188+
}
187189
}
188190

189191
public function register()

0 commit comments

Comments
 (0)