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

Bug: Typo example "Using Named Routes" #2888

Closed
TimBrownlaw opened this issue Apr 26, 2020 · 0 comments
Closed

Bug: Typo example "Using Named Routes" #2888

TimBrownlaw opened this issue Apr 26, 2020 · 0 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@TimBrownlaw
Copy link

https://codeigniter4.github.io/userguide/incoming/routing.html#reverse-routing

Heading: Using Named Routes.
Issue: Missing Closing ] on 2nd line of example.
IS

// The route is defined as:
$routes->add('users/(:id)/gallery(:any)', 'Galleries::showUserGallery/$1/$2', ['as' => 'user_gallery');

// Generate the relative URL to link to user ID 15, gallery 12
// Generates: /users/15/gallery/12
<a href="<?= route_to('user_gallery', 15, 12) ?>">View Gallery</a>

2nd line read:
$routes->add('users/(:id)/gallery(:any)', 'Galleries::showUserGallery/$1/$2', ['as' => 'user_gallery');
Should be
$routes->add('users/(:id)/gallery(:any)', 'Galleries::showUserGallery/$1/$2', ['as' => 'user_gallery']);

@TimBrownlaw TimBrownlaw added the bug Verified issues on the current code behavior or pull requests that will fix them label Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

2 participants