dusterio / lumen-passport

Making Laravel Passport work with Lumen
MIT License
654 stars 139 forks source link

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

Closed kng-caoxuanson closed 5 months ago

kng-caoxuanson commented 6 months ago

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.

ekopras18 commented 5 months ago

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

UKF-JozefVirag commented 5 months ago

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

kng-caoxuanson commented 5 months ago

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.