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

Feature request #7

Open
CodeAdraas opened this issue Mar 19, 2021 · 1 comment
Open

Feature request #7

CodeAdraas opened this issue Mar 19, 2021 · 1 comment
Labels

Comments

@CodeAdraas
Copy link

wildcard route (asterisk)

e.g
$API->post( "/user/*"..

Would this be possible?

@ocram ocram added the question label Mar 19, 2021
@ocram
Copy link
Contributor

ocram commented Mar 19, 2021

Thanks!

Wouldn’t this be solved with “dynamic route (with parameters)” (see README) as well?

$router->post('/user/:ignored', function ($ignored) {
    // do something
});

You should even be able to write just function () without the parameter there.

But most of the times, you actually want to know the value of the wildcard, so that you can handle it differently depending on the value. Otherwise, you could (often) just omit that wildcard segment in the URL.

Does this help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants