CLI Console



New to 3 is a command line utility aptly named Nova located in the root. It currently supports creating controllers and models from the command line.

To use it navigate to the project in your command line/terminal then type php nova followed by the command.

remove cache files

To remove the files in storage/cache:

php nova clear:cache

remove the log files

To remove the files in storage/logs:

php nova clear:logs

remove the session files

To remove the files in storage/sessions:

php nova clear:sessions

remove the view cache files

To remove the files in storage/views:

php nova clear:views

Creating a controller

To create a controller type make:controller followed by the names of the methods to be created:

php nova make:controller lists index add edit view delete

This will create a controller called Lists with 5 methods, additionally a Lists folder will be created in the views folder along with 5 files, one for each method. The files will be empty.

Creating a model

To create a model type model followed by the names of the methods to be created:

php nova make:model lists getAll add edit delete

This will create a controller called Lists with 4 methods.

Generate an Encryption Key

To generate an encryption key for app/Config/App.php, type in the following:

php nova make:key

This will generate a 32 character alpha-numeric key.