Configuration Commands

Updated on Jul 11, 2024

It is time we looked at some ways to configure your application without manually doing it via its files. These commands will allow you to change things about your app directly from the CLI. 

  • php artisan clear-compiled - Remove the compiled class file;
  • php artisan down - Puts the application in maintenance mode;
  • php artisan up - Brings the application out of maintenance mode;
  • php artisan optimize - Caches the application's bootstrap files for quicker execution;
  • php artisan config:show - Shows information about a specific configuration file. Add the name of the file (without .php at the end) to the end of the command to view its details;
  • php artisan config:cache -  Create a cache file for faster configuration loading;
  • php artisan config:clear - Clear the configuration cache file;
  • php artisan db:wipe - Removes all tables, views, and types from the application's database.

These commands let you perform quick configurations for your application without leaving the CLI.

On this page...