Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ class GetPhotoEdit // parent: GetPhoto

GET /photo/1/edit

> **Tip:**
>
> For a URL with a parameter in the middle (like `/photo/1/edit`),
> AutoRoute needs to be able to determine that `1` is a parameter
> and not a namespace segment. It does this by checking if a parent
> class exists that handles the same path without the tail segment.
>
> In this example, `Project\Http\Photo\GetPhoto` with the `int $photoId`
> parameter must exist for `Project\Http\Photo\Edit\GetPhotoEdit`
> to work correctly. This allows the router to understand that in
> `/photo/1/edit`, the `1` corresponds to the `$photoId` parameter
> and `edit` is a static path segment.

Finally, a request for the root URL ...

GET /
Expand Down