Create HTTP Controller

apex create http-controller <PKG_ALIAS> <ALIAS> [--route=]
Create and register a new HTTP controller within the /src/HttpControllers directory

Parameters

Parameter Description
pkg_alias Package alias to register HTTP controller to.
alias The alias / filename of the HTTP controller to create.

Flags

Flag Description
--route If defined, new route within /boot/routes.yml file will be added.

Examples

  • ./apex create http-controller my-shop products --route product