In the Spiral Framework, console commands allow you to perform various tasks from the command line. These tasks can range from simple operations like clearing a cache, to more complex ones like running migrations or seeding a database. Console commands are a useful tool for automating repetitive tasks and can save you time when developing and maintaining your application.
To list all available console commands use the following command:
To get help about any specific command:
php app.php help db:table
php app.php db:table -h
You can read how to create your own commands here.
To use command aliases, simply type the abbreviated version of the command you wish to use instead of the full command name. For example, if you have a command called "send-email", you can use the alias "se" by typing "se" instead of "send-email".
# Common variant php app.php send-email # Can be resolved into `send-email` php app.php se
configure command included in your application performs a series of operations to set up and verify the proper installation of the application.
It creates necessary directories and checks permissions for resources.
To run this command with verbose output, use the
php app.php configure -vv
configurebefore running a newly installed application.
The application server (RoadRunner) includes its own set of commands. To list all the available server commands, run:
You can read more about server commands here.