Get List of Laravel Artisan Commands

Get List of Laravel Artisan Commands

Laravel Artisan commands are a powerful tool that streamline various tasks within a Laravel application, from database migrations to code generation. These commands provide developers with a convenient way to perform common tasks, manage the application, and interact with various components of the Laravel framework. This tutorial explains how to get a list of Laravel Artisan commands.

To obtain a list of available Laravel Artisan commands, the simplest approach is to use the artisan command without any additional arguments. Alternatively, you can achieve the same result by explicitly including the list argument, as it serves as the default command for displaying the list of Artisan commands.

php artisan
php artisan list

Output example:

  command [options] [arguments]

  -h, --help            Display help for the given command. When no command...

Available commands:
  about                   Display basic information about your application
  clear-compiled          Remove the compiled class file
  completion              Dump the shell completion script
  app:test                Command description
  auth:clear-resets       Flush expired password reset tokens

Laravel provides the capability to filter commands based on their namespace. For instance, if you wish to view commands that are specifically related to your application, you can utilize:

php artisan list app

This action will showcase exclusively the commands within the app namespace, simplifying the process of managing and exploring commands associated with the project.

Leave a Comment

Cancel reply

Your email address will not be published.