Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing doesn't work in lumen #365

Closed
alibokiev opened this issue Nov 12, 2021 · 4 comments
Closed

Routing doesn't work in lumen #365

alibokiev opened this issue Nov 12, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@alibokiev
Copy link

$router->group([
'middleware' => $middleware
], function () use ($router, $prefix) {
$router->get($prefix, ['uses' => [Controller::class, 'webpage'], 'as' => 'scribe']);
$router->get("$prefix.postman", ['uses' => [Controller::class, 'postman'], 'as' => 'scribe.postman']);
$router->get("$prefix.openapi", ['uses' => [Controller::class, 'openapi'], 'as' => 'scribe.openapi']);
});

Routing doesn't work in lumen.

image

in lumen is not accepted in uses array to pass as in laravel. Or maybe I missed something. I would be grateful if you correct me )

@alibokiev alibokiev added the bug Something isn't working label Nov 12, 2021
@alibokiev
Copy link
Author

alibokiev commented Nov 12, 2021

I fixed it this way

$router->group([
'middleware' => $middleware,
], function () use ($router, $prefix) {
$router->get($prefix, ['uses' => 'Knuckles\Scribe\Http\Controller@webpage', 'as' => 'scribe']);
$router->get("$prefix.postman", ['uses' => 'Knuckles\Scribe\Http\Controller@postman', 'as' => 'scribe.postman']);
$router->get("$prefix.openapi", ['uses' => 'Knuckles\Scribe\Http\Controller@openapi', 'as' => 'scribe.openapi']);
});

I would like to know your opinion on how much is correct

@shalvah
Copy link
Contributor

shalvah commented Nov 16, 2021

Wow. Lumen really is terrible. Fixed in 3.16.0

@alibokiev
Copy link
Author

yeah, partially agree :)
thanks !

@alibokiev
Copy link
Author

@shalvah , sorry, I had a question off topic. Why can't I create another issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants