Tool
Laravel Artisan Command Reference
Search common Laravel Artisan commands and open the official documentation for each one. Option flags are not listed here.
Limitations. Commands and options vary by Laravel version. This page does not invent flags. Run php artisan help and the linked docs for the version you have installed.
How to use it
Filter by name. Copy copies the command template. Replace placeholders such as {Name} before you run it in your own project.
No commands match that filter.
Discover
php artisan list
Show the commands available in the installed Laravel application.
php artisan help {command}
Show the description and options for one installed command. Replace {command}.
php artisan about
Show a summary of the application environment and configured drivers.
Local
php artisan serve
Start the local PHP development server.
php artisan tinker
Open an interactive shell with the application bootstrapped.
Setup
php artisan key:generate
Set the application key.
php artisan storage:link
Create the public storage link.
Generators
php artisan make:model {Name}
Create a model class. Replace {Name}.
php artisan make:controller {Name}
Create a controller class. Replace {Name}.
php artisan make:migration {name}
Create a migration. Replace {name}.
php artisan make:request {Name}
Create a form request. Replace {Name}.
php artisan make:middleware {Name}
Create a middleware class. Replace {Name}.
php artisan make:seeder {Name}
Create a seeder class. Replace {Name}.
php artisan make:factory {Name}
Create a model factory. Replace {Name}.
php artisan make:policy {Name}
Create an authorization policy. Replace {Name}.
php artisan make:resource {Name}
Create an API resource. Replace {Name}.
php artisan make:command {Name}
Create a custom Artisan command. Replace {Name}.
php artisan make:event {Name}
Create an event class. Replace {Name}.
php artisan make:listener {Name}
Create an event listener. Replace {Name}.
php artisan make:mail {Name}
Create a mailable. Replace {Name}.
php artisan make:notification {Name}
Create a notification. Replace {Name}.
php artisan make:job {Name}
Create a queued job. Replace {Name}.
php artisan make:test {Name}
Create a test class. Replace {Name}.
Database
php artisan migrate
Run outstanding migrations.
php artisan migrate:rollback
Roll back the last batch of migrations.
php artisan migrate:status
Show which migrations have run.
php artisan migrate:fresh
Drop all tables and run every migration again.
php artisan db:seed
Run database seeders.
php artisan model:show {Model}
Show a model’s columns and relationships. Replace {Model}.
HTTP
php artisan route:list
List registered routes.
php artisan event:list
List registered events and listeners.
Cache
php artisan config:cache
Create a configuration cache.
php artisan config:clear
Remove the configuration cache.
php artisan route:cache
Create a route cache.
php artisan route:clear
Remove the route cache.
php artisan view:cache
Compile Blade views.
php artisan view:clear
Remove compiled views.
php artisan cache:clear
Flush the application cache.
php artisan optimize
Cache framework bootstrap files.
php artisan optimize:clear
Remove the framework caches created for deployment.
Queues
php artisan queue:work
Process jobs from the queue.
php artisan queue:listen
Process jobs and restart when code changes.
php artisan queue:failed
List failed jobs.
php artisan queue:retry {id}
Retry a failed job. Replace {id}, or see the docs for retrying all.
Schedule
php artisan schedule:list
List scheduled tasks.
php artisan schedule:run
Run tasks that are due. This is the command a system cron usually calls.
Maintenance
php artisan down
Put the application into maintenance mode.
php artisan up
Bring the application out of maintenance mode.
Packages
php artisan vendor:publish
Publish package assets or configuration.
Tests
php artisan test
Run the application test suite.