Tim Riedl

Results 48 comments of Tim Riedl

This would make sense yes, right now I'm doing it this way but I wish there was something like this as a feature in Markdown

My Gist could help https://gist.github.com/uvulpos/3e7f335f46bd9400c368222d38e81da8

https://github.com/sec51/twofactor/blob/master/totp.go#L109 ```golang func makeTOTP(key []byte, account, issuer string, hash crypto.Hash, digits int) (*Totp, error) { otp := new(Totp) otp.key = key otp.account = account otp.issuer = issuer otp.digits = digits...

LGTM if it works (did not test that yet), but please add some unit tests 😉 that would be icing on the cake 👍🏻

Already implemented via `all` method, [see here](https://github.com/bramus/router/blob/master/src/Bramus/Router/Router.php#L96)

Seems to work using Bramus version `1.6` and PHP `7.4.21` (if your project is not up-to-date, try ⇾ `composer update`) ```php

You're right. The current project structure does not allow that because `setNamespace` [defines just a class-variable](https://github.com/bramus/router/blob/master/src/Bramus/Router/Router.php#L250). To fix that, you need to [move `getNamespace`](https://github.com/bramus/router/blob/master/src/Bramus/Router/Router.php#L467). Please consider making a pull request...

I'm working on a PR rn, so you can call other routes except 404. Your feature would be possible after hat merge, but it would need much more unnecessary performance...

## [ Just thinking → no implemented solution yet ] I would say you can give routes optional names, and you can call them by that ```php $router->get('/route(/.*)?', function() {...

In case you have an Apache / Nginx webserver you can simply create virtualhosts to create independent projects. Otherwise, you can simply take a look at [Superglobals in PHP](https://www.php.net/manual/de/reserved.variables.server.php) ~...