Back to Phoenix

Phoenix

usage-rules/phoenix.md

1.8.5619 B
Original Source

Phoenix guidelines

  • Remember Phoenix router scope blocks include an optional alias which is prefixed for all routes within the scope. Always be mindful of this when creating routes within a scope to avoid duplicate module prefixes.

  • You never need to create your own alias for route definitions! The scope provides the alias, ie:

    scope "/admin", AppWeb.Admin do
      pipe_through :browser
    
      live "/users", UserLive, :index
    end
    

    the UserLive route would point to the AppWeb.Admin.UserLive module

  • Phoenix.View no longer is needed or included with Phoenix, don't use it