For Phoenix 1.7 you can pass an option --info
for a path and the mix
command will return to you the controller, action and file name with line for that router.
mix phx.routes --info http://localhost:4000/status
results
$ mix phx.routes --info http://localhost:4000/status
Module: ExampleWeb.StatusController
Function: :status
/Users/lab/example/lib/example_web/controllers/status_controller.ex:7
More info https://hexdocs.pm/phoenix/1.7.7/Mix.Tasks.Phx.Routes.html
Commit for this change on Phoenix repository
https://github.com/phoenixframework/phoenix/commits/v1.7.7/lib/mix/tasks/phx.routes.ex
Top comments (0)