We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/auraphp/Aura.Router/blob/3.x/docs/defining-routes.md#custom-placeholder-token-matching
tweaking the supplied example so that date is optional (and even supplying a default date)
<?php $map->get('/calendar{/date}') ->tokens([ 'date' => function ($date, $route, $request) { try { new \DateTime($date); return true; } catch(\Exception $e) { return false; } } ]) ->defaults(['date'=>'yesterday']);
will throw a notice: vendor/aura/router/src/Rule/Path.php (line 89): = Undefined index: date
vendor/aura/router/src/Rule/Path.php (line 89): = Undefined index: date
notice is thrown even when supplying a default date value.
The text was updated successfully, but these errors were encountered:
Fixes auraphp#162
2c9188e
Add test for auraphp#162
a104c6b
Merge pull request #188 from NaokiTsuchiya/test-for-issue-162
f261130
Add test for #162
038abcc
Merge pull request #187 from harikt/issue-162
00301da
Fixes #162
No branches or pull requests
https://github.com/auraphp/Aura.Router/blob/3.x/docs/defining-routes.md#custom-placeholder-token-matching
tweaking the supplied example so that date is optional (and even supplying a default date)
will throw a notice:
vendor/aura/router/src/Rule/Path.php (line 89): = Undefined index: date
notice is thrown even when supplying a default date value.
The text was updated successfully, but these errors were encountered: