Five Artisan commands cover most routine work in a Laravel project: listing what the application can do, inspecting routes, generating a model with its migration, running pending migrations, and exploring live application code with Tinker. This guide explains when each one helps and what it can change. The list follows the workflow Laravel’s own documentation describes. It is not a record of how often any particular developer runs these commands.
Check your version and environment first
Command options and available commands can differ between Laravel releases. The syntax below is checked against the Laravel 13.x Artisan documentation. Before you run anything, confirm which version your project uses:
As an Amazon Associate I earn from qualifying purchases.
php artisan --version
If the output shows an older release, read the matching documentation for that version. Run php artisan help <command> at any time to see the options your installed version accepts.
Recommended Free Tools
If your local environment runs through Laravel Sail, prefix every command with the Sail wrapper. Laravel’s documentation states: “If you are using Laravel Sail as your local development environment, remember to use the sail command line to invoke Artisan commands.” The documented example is:
#1 Best Overall
./vendor/bin/sail artisan list
The examples in this article use plain php artisan. For Sail, substitute ./vendor/bin/sail artisan.
The five commands
Laravel’s documentation describes Artisan as “the command line interface included with Laravel.” It lives at the root of every application as the artisan script. Each command below covers one task, followed by the main thing to watch for.
1. php artisan list: discover what the application can do
Run this when you open an unfamiliar project, or when you cannot remember the name of a command. It prints every command available in the current application, including commands added by installed packages.
Free tools Windows power users keep installed
One-click scans. No signup required.
php artisan list
To see the arguments and options for a single command, pass its name to help:
php artisan help migrate
This command only reads information. It does not touch the database or the filesystem.
2. php artisan route:list: inspect registered routes
This command prints a table of the routes your application has registered, which is the quickest way to confirm that a route exists and points where you expect. It is most useful after adding a route file or a controller, or when a URL returns an unexpected response.
Rank #3
php artisan route:list
The routing documentation describes this command as an overview of routes and notes options for narrowing the output, such as filtering by path or showing middleware. Those option names have changed across releases. The routing documentation available for this article covers Laravel 10.x, so run php artisan help route:list in your project to confirm which filters and verbosity flags your version supports before relying on them.
In a large application the table can run long. Pipe the output through a search tool or use a path filter rather than scanning every row.
3. php artisan make:model Flight -m: scaffold a model and its migration together
The make:model command generates an Eloquent model class. Adding -m (or the longer --migration) also generates a database migration for the model’s table. “Flight” is only an example name. Replace it with a singular, StudlyCase name that matches your domain, such as Invoice or Subscription.
Rank #4
php artisan make:model Flight -m
Expect two new files:
app/Models/Flight.php, the model class.- A timestamped file in
database/migrations/whose name ends increate_flights_table.php. Itsup()method is where you define the table’s columns.
The migration is not applied yet. Nothing changes in your database until you run migrate, so review the columns first.
4. php artisan migrate: run pending database migrations
This command applies every migration that has not yet run against the database configured in your .env file. It is the normal step after you create or edit a migration during local development.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallphp artisan migrate
Treat this as a development step, not a routine production deployment step. Running it against a production database changes live schema, and some changes cannot be reversed without data loss. Take a backup, review the pending migrations, and confirm that your deployment process is set up for this before running anything in production.
Best Value
Laravel includes a safeguard for production environments: when APP_ENV is set to production, the command asks for confirmation. The --force flag skips that prompt. Use it only when you have made a deliberate decision to run the migrations, and check the current migration documentation for your version before relying on this behavior.
5. php artisan tinker: explore the running application
Tinker is a REPL, a read-evaluate-print loop, powered by PsySH. Laravel describes it as a way to interact with the application, including Eloquent models, jobs, and events. Use it to check a query, test a model relationship, or confirm what a helper returns.
php artisan tinker
>>> AppModelsFlight::count()
Tinker runs real code against the database your application is configured to use. It is not a sandbox. A call such as AppModelsFlight::truncate() removes every row immediately, with no undo. Read-only queries are the safe default. Before you write or delete anything in a session, confirm which database the session connects to.
Tinker’s default command allow list includes migrate, so the migration command can also be invoked from inside a session. That is one more reason to keep Tinker away from production data unless you have a specific reason to be there.
Side-by-side: what each command changes
| Command | Main task | Changes files or data? | Main caution |
|---|---|---|---|
php artisan list |
Discover available commands | No | None for normal use |
php artisan route:list |
Inspect registered routes | No | Output can be long in large applications; check option names for your version |
php artisan make:model Flight -m |
Generate a model and migration | Creates new files in the project | Generated files do nothing until you migrate, so review the migration first |
php artisan migrate |
Apply pending migrations | Changes the database schema | Back up first; production requires deliberate confirmation |
php artisan tinker |
Run PHP against the application interactively | Can, if the code writes or deletes | Code runs against the configured database; confirm the connection before writing |
A typical local sequence
The commands fit together in a single workflow. Here is one common order for adding a new table in local development:
- Run
php artisan listorphp artisan help make:modelif you need to confirm options. - Run
php artisan make:model Flight -mto create the model and migration. - Edit the migration in
database/migrations/and define the columns. - Run
php artisan migrateto create the table locally. - Run
php artisan route:listif the change involves routes, thenphp artisan tinkerto check the new model with a read-only query.
Keep this sequence on your local machine or a staging copy. Production changes need their own review and deployment steps.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →




