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

docs: add missing console output #5964

Closed
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
27 changes: 27 additions & 0 deletions guides/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,33 @@ end

You can run `mix phx.routes` to see how these definitions will look like.

```console
GET /api/v1/images HelloWeb.Api.V1.ImageController :index
GET /api/v1/images/:id/edit HelloWeb.Api.V1.ImageController :edit
GET /api/v1/images/new HelloWeb.Api.V1.ImageController :new
GET /api/v1/images/:id HelloWeb.Api.V1.ImageController :show
POST /api/v1/images HelloWeb.Api.V1.ImageController :create
PATCH /api/v1/images/:id HelloWeb.Api.V1.ImageController :update
PUT /api/v1/images/:id HelloWeb.Api.V1.ImageController :update
DELETE /api/v1/images/:id HelloWeb.Api.V1.ImageController :delete
GET /api/v1/reviews HelloWeb.Api.V1.ReviewController :index
GET /api/v1/reviews/:id/edit HelloWeb.Api.V1.ReviewController :edit
GET /api/v1/reviews/new HelloWeb.Api.V1.ReviewController :new
GET /api/v1/reviews/:id HelloWeb.Api.V1.ReviewController :show
POST /api/v1/reviews HelloWeb.Api.V1.ReviewController :create
PATCH /api/v1/reviews/:id HelloWeb.Api.V1.ReviewController :update
PUT /api/v1/reviews/:id HelloWeb.Api.V1.ReviewController :update
DELETE /api/v1/reviews/:id HelloWeb.Api.V1.ReviewController :delete
GET /api/v1/users HelloWeb.Api.V1.UserController :index
GET /api/v1/users/:id/edit HelloWeb.Api.V1.UserController :edit
GET /api/v1/users/new HelloWeb.Api.V1.UserController :new
GET /api/v1/users/:id HelloWeb.Api.V1.UserController :show
POST /api/v1/users HelloWeb.Api.V1.UserController :create
PATCH /api/v1/users/:id HelloWeb.Api.V1.UserController :update
PUT /api/v1/users/:id HelloWeb.Api.V1.UserController :update
DELETE /api/v1/users/:id HelloWeb.Api.V1.UserController :delete
```

Interestingly, we can use multiple scopes with the same path as long as we are careful not to duplicate routes. The following router is perfectly fine with two scopes defined for the same path:

```elixir
Expand Down