dusterio/lumen-passport

Call to undefined method Laravel\Lumen\Routing\Router::middleware()

Closed this issue · 3 comments

I am using lumen version 10

If I add this code to the bootstrap/app.php file it gives an error

$app->register(Laravel\Passport\PassportServiceProvider::class);

Error information: Call to undefined method Laravel\Lumen\Routing\Router::middleware()

help me.

inside AuthServiceProvider.php method boot()
put this code :
Passport::$registersRoutes = false;

see this https://github.com/dusterio/lumen-passport/pull/182, work for me

Great. Thank you very much.

inside AuthServiceProvider.php method boot()
put this code :
Passport::$registersRoutes = false;

Great. Thank you very much.