You can do that if you want. Just remove `def router` from `MyAppWeb` move its contents over to a custom module:
defmodule MyAppWeb.Router do
defmacro __using__(_) do
quote do
use Phoenix.Router, helpers: false
import Plug.Conn
import Phoenix.Controller
import Phoenix.LiveView.Router
end
end
end
But why the dislike for passing a second argument to `use`? It keeps everything together pretty nicely.
Oh! Well I don't know your setup but you could always add a top level `PhoenixHelpers` namespace (or a better name) that holds these generic types of things that can be shared between apps. Though again I really don't know your set up. Like maybe you have an app whose router doesn't need `Phoenix.Controller` so then this wouldn't make sense.