Console commands
- Console commands
- Devtool
- Running the simulator
- Create a new menu
- Other console commands
- Help on a command
Console commands
Rejoice ships with useful console features to allow you test quickly your application and other more.
The console application in Rejoice is name smile
.
Devtool
Rejoice provides a very handful devtool to interact with your application. You can access the devtool by running in a console (opened in the project root):
php smile devtool
You can run any valid PHP code inside the devtool and also use the classes of your application.
Running the simulator
You have access to two simulators, one in console, the other as a web interface. You can provide the configuration of the simulator in the .env file:
Web simulator
Run the console simulator by running the command
php smile serve
or
php smile simulator:web
Console simulator
Run the console simulator by running the command
php smile serve -c console
or
php smile simulator:console
You can use the shortcut php smile sim:con
Note: You can use shortcuts for any simulator command, provided it does not conflict with any other command.
Create a new menu
Directly in the Menus folder
php smile make:menu MyMenu
Will create the class MyMenu
in a newly created app/Menus/MyMenu.php
.
In a Menu sub-folder
php smile make:menu FirstFlow/MyMenu
Will create the class MyMenu
in a newly created app/Menus/FirstFlow/MyMenu.php
. If the sub-folder does not exist, it will be created.
Other console commands
You can retrieve any other console command by running:
php smile list
Help on a command
To read the help of a command, run:
php smile help name_of_the_command