Updated on Jul 11, 2024
Earlier in this tutorial, we mentioned that Artisan is the CLI for Laravel. While Laravel uses another command line utility in the form of Composer, Artisan is used to manage Laravel itself, not its dependencies. It is important not to confuse the two despite both being command-line utilities. With that said, though, let's look at some basic commands for Artisan and what they do. But how do we find out what commands are available to us? The developers of Artisan have been awesome enough to include a list command, which does exactly what it says: it lists all available Artisan commands. The command itself is this.
php artisan list
The screenshot above shows just the top of the list. There are many more beyond those. Now, let's check out a few of the more baseline commands.
Using these commands, you can manage your application and view its information on a more basic level. You might have noticed that the top of the list also contains an Options section. These options can be appended to each command, and they will alter the way it functions. For instance, writing a -h after a command will display the help section for that command instead of running it. Not only that, but you will also see all the options that specific command can use. Like this, for example.
We ran the php artisan serve -h command, which did not start our development server. Instead, it showed us an explanation of what the command does and also gave us all the options it can use. These options are incredibly useful when you want to customize the way a command works.
Next, we will discuss some commands that allow you to configure your application directly from the CLI.