Generate an application class file

As of swoftcli v0.1.0 , it is possible to quickly create an application class with built-in commands.

Support for creating:

  • Console command class
  • Event listener class
  • Task class
  • Crontab task class
  • Http controller class
  • Http middleware class
  • Rpc controller class
  • Rpc middleware class
  • Tcp controller class
  • Websocket module class
  • Websocket controller class
  • And more ...

View command group

 php swoftcli.phar gen
// or
php swoftcli.phar gen --help 


Command use

  • Generate http controller
 php swoftcli.phar gen:http-ctrl user --prefix /users 
  • Build http middleware
 php swoftcli.phar gen:http-mdl demo 
  • Generate websocket module
 php swoftcli.phar gen:ws-mod chat --prefix /chat 
  • Generate websocket controller
 php swoftcli.phar gen:ws-ctrl chat