phoenix_extra_generators v0.1.0 mix phx.gen.controller View Source

Generates a Phoenix controller.

mix phx.gen.controller Posts

Accepts the module name for the controller

The generated files will contain:

For a regular application:

  • a controller in lib/my_app_web/controllers
  • a controller_test in test/my_app_web/controllers

For an umbrella application:

  • a controller in apps/my_app_web/lib/app_name_web/controllers
  • a controller_test in apps/my_app_web/test/my_app_web/controllers