Miscellaneous Commands

Updated on Jul 11, 2024

To close off our section about Artisan, we will show you a few extra commands that don't really fit in the previous categories. These commands can still be helpful, though, and you should keep them in mind when developing your application. 

  • php artisan inspire - Display an inspiring quote by a famous person;
  • php artisan auth:clear-resets - Flush expired password reset tokens. This is a helpful general-use command that won't come up often, but it's good that it's present;
  • php artisan env:encrypt - Encrypt an environment file. Previously, we talked about encrypting the .env file, and this command and the one below are what you have to use to do so;
  • php artisan env:decrypt - Decrypt an environment file, in case you no longer need it to be encrypted;
  • php artisan lang:publish - Publish all language files available for customization. This command will show you all the languages you have available for your application;
  • php artisan model:show - Show information about an Eloquent model. Earlier in the tutorial, we talked about Eloquent, and this command will show you details about a specific model it created;
  • php artisan route:list - List all registered routes. Another general-use command that will show you all the routes your application is currently working with. We will elaborate on routes later on in this tutorial.

These commands may not appear often in your development process, but it is good to know they are there. Of course, the list is not extensive; we thought these are the more important ones. You can always use the php artisan list command to find a complete list of Artisan commands.

On this page...