[Router] Add generate path with dynamic value #3

Closed
opened 2024-11-01 12:21:47 +00:00 by ahokponou · 0 comments
ahokponou commented 2024-11-01 12:21:47 +00:00 (Migrated from github.com)

Update existing generatePath() method in the Router class to generate paths with dynamic values. This should allow developers to create URLs with parameters or dynamic segments without manually concatenating strings.

Example:

Assuming dynamic segment userID
$router->generatePath('profile', [ 'userID' => 123 ]);
Expected output: '/account/profile/123'

Update existing `generatePath()` method in the Router class to generate paths with dynamic values. This should allow developers to create URLs with parameters or dynamic segments without manually concatenating strings. **Example:** > Assuming dynamic segment userID $router->generatePath('profile', [ 'userID' => 123 ]); > Expected output: '/account/profile/123'
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
oladesoftware/httpcrafter#3
No description provided.