auth:clear-resets
Flush expired password reset tokens
Arguments:
name
- The name of the password broker Optional
php artisan auth:clear-resets [<name>]
cache:clear
Flush the application cache
Options:
tags
- The cache tags you would like to clear Optional
Arguments:
store
- The name of the store you would like to clear Optional
php artisan cache:clear [--tags [TAGS]] [--] [<store>]
cache:forget
Remove an item from the cache
Arguments:
key
- The key to remove Requiredstore
- The store to remove the key from Optional
php artisan cache:forget <key> [<store>]
cache:table
Create a migration for the cache database table
php artisan cache:table
clear-compiled
Remove the compiled class file
php artisan clear-compiled
config:cache
Create a cache file for faster configuration loading
php artisan config:cache
config:clear
Remove the configuration cache file
php artisan config:clear
db
Start a new database CLI session
Arguments:
connection
- The database connection that should be used Optional
php artisan db [<connection>]
db:seed
Seed the database with records
Options:
class
- The class name of the root seeder Optionaldatabase
- The database connection to seed Optionalforce
- Force the operation to run when in production Optional
php artisan db:seed [--class [CLASS]] [--database [DATABASE]] [--force]
db:wipe
Drop all tables, views, and types
Options:
database
- The database connection to use Optionaldrop-views
- Drop all tables and views Optionaldrop-types
- Drop all tables and types (Postgres only) Optionalforce
- Force the operation to run when in production Optional
php artisan db:wipe [--database [DATABASE]] [--drop-views] [--drop-types] [--force]
down
Put the application into maintenance / demo mode
Options:
redirect
- The path that users should be redirected to Optionalrender
- The view that should be prerendered for display during maintenance mode Optionalretry
- The number of seconds after which the request may be retried Optionalsecret
- The secret phrase that may be used to bypass maintenance mode Optionalstatus
- The status code that should be used when returning the maintenance mode response Optional
php artisan down [--redirect [REDIRECT]] [--render [RENDER]] [--retry [RETRY]] [--secret [SECRET]] [--status [STATUS]]
env
Display the current framework environment
php artisan env
event:cache
Discover and cache the application's events and listeners
php artisan event:cache
event:clear
Clear all cached events and listeners
php artisan event:clear
event:generate
Generate the missing events and listeners based on registration
php artisan event:generate
event:list
List the application's events and listeners
Options:
event
- Filter the events by name Optional
php artisan event:list [--event [EVENT]]
help
Displays help for a command
Options:
format
- The output format (txt, xml, json, or md) Requiredraw
- To output raw command help Optional
Arguments:
command_name
- The command name Optional
php artisan help [--format FORMAT] [--raw] [--] [<command_name>]
inspire
Display an inspiring quote
php artisan inspire
key:generate
Set the application key
Options:
show
- Display the key instead of modifying files Optionalforce
- Force the operation to run when in production Optional
php artisan key:generate [--show] [--force]
list
Lists commands
Options:
raw
- To output raw command list Optionalformat
- The output format (txt, xml, json, or md) Required
Arguments:
namespace
- The namespace name Optional
php artisan list [--raw] [--format FORMAT] [--] [<namespace>]
php artisan make:cast <name>
php artisan make:channel <name>
make:command
Create a new Artisan command
Options:
command
- The terminal command that should be assigned Optional
Arguments:
name
- The name of the command Required
php artisan make:command [--command [COMMAND]] [--] <name>
make:component
Create a new view component class
Options:
force
- Create the class even if the component already exists Optionalinline
- Create a component that renders an inline view Optional
Arguments:
name
- The name of the class Required
php artisan make:component [--force] [--inline] [--] <name>
make:controller
Create a new controller class
Options:
api
- Exclude the create and edit methods from the controller. Optionalforce
- Create the class even if the controller already exists Optionalinvokable
- Generate a single method, invokable controller class. Optionalmodel
- Generate a resource controller for the given model. Optionalparent
- Generate a nested resource controller class. Optionalresource
- Generate a resource controller class. Optional
Arguments:
name
- The name of the class Required
php artisan make:controller [--api] [--force] [-i|--invokable] [-m|--model [MODEL]] [-p|--parent [PARENT]] [-r|--resource] [--] <name>
php artisan make:event <name>
make:exception
Create a new custom exception class
Options:
render
- Create the exception with an empty render method Optionalreport
- Create the exception with an empty report method Optional
Arguments:
name
- The name of the class Required
php artisan make:exception [--render] [--report] [--] <name>
make:factory
Create a new model factory
Options:
model
- The name of the model Optional
Arguments:
name
- The name of the class Required
php artisan make:factory [-m|--model [MODEL]] [--] <name>
make:job
Create a new job class
Options:
sync
- Indicates that job should be synchronous Optional
Arguments:
name
- The name of the class Required
php artisan make:job [--sync] [--] <name>
make:listener
Create a new event listener class
Options:
event
- The event class being listened for Optionalqueued
- Indicates the event listener should be queued Optional
Arguments:
name
- The name of the class Required
php artisan make:listener [-e|--event [EVENT]] [--queued] [--] <name>
make:mail
Create a new email class
Options:
force
- Create the class even if the mailable already exists Optionalmarkdown
- Create a new Markdown template for the mailable Optional
Arguments:
name
- The name of the class Required
php artisan make:mail [-f|--force] [-m|--markdown [MARKDOWN]] [--] <name>
php artisan make:middleware <name>
make:migration
Create a new migration file
Options:
create
- The table to be created Optionaltable
- The table to migrate Optionalpath
- The location where the migration file should be created Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionalfullpath
- Output the full path of the migration Optional
Arguments:
name
- The name of the migration Required
php artisan make:migration [--create [CREATE]] [--table [TABLE]] [--path [PATH]] [--realpath] [--fullpath] [--] <name>
make:model
Create a new Eloquent model class
Options:
all
- Generate a migration, seeder, factory, and resource controller for the model Optionalcontroller
- Create a new controller for the model Optionalfactory
- Create a new factory for the model Optionalforce
- Create the class even if the model already exists Optionalmigration
- Create a new migration file for the model Optionalseed
- Create a new seeder file for the model Optionalpivot
- Indicates if the generated model should be a custom intermediate table model Optionalresource
- Indicates if the generated controller should be a resource controller Optionalapi
- Indicates if the generated controller should be an API controller Optional
Arguments:
name
- The name of the class Required
php artisan make:model [-a|--all] [-c|--controller] [-f|--factory] [--force] [-m|--migration] [-s|--seed] [-p|--pivot] [-r|--resource] [--api] [--] <name>
make:notification
Create a new notification class
Options:
force
- Create the class even if the notification already exists Optionalmarkdown
- Create a new Markdown template for the notification Optional
Arguments:
name
- The name of the class Required
php artisan make:notification [-f|--force] [-m|--markdown [MARKDOWN]] [--] <name>
make:observer
Create a new observer class
Options:
model
- The model that the observer applies to. Optional
Arguments:
name
- The name of the class Required
php artisan make:observer [-m|--model [MODEL]] [--] <name>
make:policy
Create a new policy class
Options:
model
- The model that the policy applies to Optionalguard
- The guard that the policy relies on Optional
Arguments:
name
- The name of the class Required
php artisan make:policy [-m|--model [MODEL]] [-g|--guard [GUARD]] [--] <name>
php artisan make:provider <name>
php artisan make:request <name>
make:resource
Create a new resource
Options:
collection
- Create a resource collection Optional
Arguments:
name
- The name of the class Required
php artisan make:resource [-c|--collection] [--] <name>
php artisan make:rule <name>
php artisan make:seeder <name>
make:test
Create a new test class
Options:
unit
- Create a unit test. Optional
Arguments:
name
- The name of the class Required
php artisan make:test [-u|--unit] [--] <name>
migrate
Run the database migrations
Options:
database
- The database connection to use Optionalforce
- Force the operation to run when in production Optionalpath
- The path(s) to the migrations files to be executed Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionalschema-path
- The path to a schema dump file Optionalpretend
- Dump the SQL queries that would be run Optionalseed
- Indicates if the seed task should be re-run Optionalstep
- Force the migrations to be run so they can be rolled back individually Optional
php artisan migrate [--database [DATABASE]] [--force] [--path [PATH]] [--realpath] [--schema-path [SCHEMA-PATH]] [--pretend] [--seed] [--step]
migrate:fresh
Drop all tables and re-run all migrations
Options:
database
- The database connection to use Optionaldrop-views
- Drop all tables and views Optionaldrop-types
- Drop all tables and types (Postgres only) Optionalforce
- Force the operation to run when in production Optionalpath
- The path(s) to the migrations files to be executed Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionalschema-path
- The path to a schema dump file Optionalseed
- Indicates if the seed task should be re-run Optionalseeder
- The class name of the root seeder Optionalstep
- Force the migrations to be run so they can be rolled back individually Optional
php artisan migrate:fresh [--database [DATABASE]] [--drop-views] [--drop-types] [--force] [--path [PATH]] [--realpath] [--schema-path [SCHEMA-PATH]] [--seed] [--seeder [SEEDER]] [--step]
migrate:install
Create the migration repository
Options:
database
- The database connection to use Optional
php artisan migrate:install [--database [DATABASE]]
migrate:refresh
Reset and re-run all migrations
Options:
database
- The database connection to use Optionalforce
- Force the operation to run when in production Optionalpath
- The path(s) to the migrations files to be executed Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionalseed
- Indicates if the seed task should be re-run Optionalseeder
- The class name of the root seeder Optionalstep
- The number of migrations to be reverted & re-run Optional
php artisan migrate:refresh [--database [DATABASE]] [--force] [--path [PATH]] [--realpath] [--seed] [--seeder [SEEDER]] [--step [STEP]]
migrate:reset
Rollback all database migrations
Options:
database
- The database connection to use Optionalforce
- Force the operation to run when in production Optionalpath
- The path(s) to the migrations files to be executed Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionalpretend
- Dump the SQL queries that would be run Optional
php artisan migrate:reset [--database [DATABASE]] [--force] [--path [PATH]] [--realpath] [--pretend]
migrate:rollback
Rollback the last database migration
Options:
database
- The database connection to use Optionalforce
- Force the operation to run when in production Optionalpath
- The path(s) to the migrations files to be executed Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionalpretend
- Dump the SQL queries that would be run Optionalstep
- The number of migrations to be reverted Optional
php artisan migrate:rollback [--database [DATABASE]] [--force] [--path [PATH]] [--realpath] [--pretend] [--step [STEP]]
migrate:status
Show the status of each migration
Options:
database
- The database connection to use Optionalpath
- The path(s) to the migrations files to use Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optional
php artisan migrate:status [--database [DATABASE]] [--path [PATH]] [--realpath]
notifications:table
Create a migration for the notifications table
php artisan notifications:table
optimize
Cache the framework bootstrap files
php artisan optimize
optimize:clear
Remove the cached bootstrap files
php artisan optimize:clear
package:discover
Rebuild the cached package manifest
php artisan package:discover
queue:batches-table
Create a migration for the batches database table
php artisan queue:batches-table
queue:clear
Delete all of the jobs from the specified queue
Options:
queue
- The name of the queue to clear Optionalforce
- Force the operation to run when in production Optional
Arguments:
connection
- The name of the queue connection to clear Optional
php artisan queue:clear [--queue [QUEUE]] [--force] [--] [<connection>]
queue:failed
List all of the failed queue jobs
php artisan queue:failed
queue:failed-table
Create a migration for the failed queue jobs database table
php artisan queue:failed-table
queue:flush
Flush all of the failed queue jobs
php artisan queue:flush
php artisan queue:forget <id>
queue:listen
Listen to a given queue
Options:
name
- The name of the worker Optionaldelay
- The number of seconds to delay failed jobs (Deprecated) Optionalbackoff
- The number of seconds to wait before retrying a job that encountered an uncaught exception Optionalforce
- Force the worker to run even in maintenance mode Optionalmemory
- The memory limit in megabytes Optionalqueue
- The queue to listen on Optionalsleep
- Number of seconds to sleep when no job is available Optionaltimeout
- The number of seconds a child process can run Optionaltries
- Number of times to attempt a job before logging it failed Optional
Arguments:
connection
- The name of connection Optional
php artisan queue:listen [--name [NAME]] [--delay [DELAY]] [--backoff [BACKOFF]] [--force] [--memory [MEMORY]] [--queue [QUEUE]] [--sleep [SLEEP]] [--timeout [TIMEOUT]] [--tries [TRIES]] [--] [<connection>]
queue:prune-batches
Prune stale entries from the batches database
Options:
hours
- The number of hours to retain batch data Optional
php artisan queue:prune-batches [--hours [HOURS]]
queue:restart
Restart queue worker daemons after their current job
php artisan queue:restart
queue:retry
Retry a failed queue job
Options:
range
- Range of job IDs (numeric) to be retried Optional
Arguments:
id
- The ID of the failed job or "all" to retry all jobs Optional
php artisan queue:retry [--range [RANGE]] [--] [<id>...]
queue:retry-batch
Retry the failed jobs for a batch
Arguments:
id
- The ID of the batch whose failed jobs should be retried Required
php artisan queue:retry-batch <id>
queue:table
Create a migration for the queue jobs database table
php artisan queue:table
queue:work
Start processing jobs on the queue as a daemon
Options:
name
- The name of the worker Optionalqueue
- The names of the queues to work Optionaldaemon
- Run the worker in daemon mode (Deprecated) Optionalonce
- Only process the next job on the queue Optionalstop-when-empty
- Stop when the queue is empty Optionaldelay
- The number of seconds to delay failed jobs (Deprecated) Optionalbackoff
- The number of seconds to wait before retrying a job that encountered an uncaught exception Optionalmax-jobs
- The number of jobs to process before stopping Optionalmax-time
- The maximum number of seconds the worker should run Optionalforce
- Force the worker to run even in maintenance mode Optionalmemory
- The memory limit in megabytes Optionalsleep
- Number of seconds to sleep when no job is available Optionaltimeout
- The number of seconds a child process can run Optionaltries
- Number of times to attempt a job before logging it failed Optional
Arguments:
connection
- The name of the queue connection to work Optional
php artisan queue:work [--name [NAME]] [--queue [QUEUE]] [--daemon] [--once] [--stop-when-empty] [--delay [DELAY]] [--backoff [BACKOFF]] [--max-jobs [MAX-JOBS]] [--max-time [MAX-TIME]] [--force] [--memory [MEMORY]] [--sleep [SLEEP]] [--timeout [TIMEOUT]] [--tries [TRIES]] [--] [<connection>]
route:cache
Create a route cache file for faster route registration
php artisan route:cache
route:clear
Remove the route cache file
php artisan route:clear
route:list
List all registered routes
Options:
columns
- Columns to include in the route table Optionalcompact
- Only show method, URI and action columns Optionaljson
- Output the route list as JSON Optionalmethod
- Filter the routes by method Optionalname
- Filter the routes by name Optionalpath
- Filter the routes by path Optionalreverse
- Reverse the ordering of the routes Optionalsort
- The column (domain, method, uri, name, action, middleware) to sort by Optional
php artisan route:list [--columns [COLUMNS]] [-c|--compact] [--json] [--method [METHOD]] [--name [NAME]] [--path [PATH]] [-r|--reverse] [--sort [SORT]]
schedule:finish
Handle the completion of a scheduled command
Arguments:
id
- Requiredcode
- Optional
php artisan schedule:finish <id> [<code>]
schedule:list
List the scheduled commands
Options:
timezone
- The timezone that times should be displayed in Optional
php artisan schedule:list [--timezone [TIMEZONE]]
schedule:run
Run the scheduled commands
php artisan schedule:run
schedule:test
Run a scheduled command
php artisan schedule:test
schedule:work
Start the schedule worker
php artisan schedule:work
schema:dump
Dump the given database schema
Options:
database
- The database connection to use Optionalpath
- The path where the schema dump file should be stored Optionalprune
- Delete all existing migration files Optional
php artisan schema:dump [--database [DATABASE]] [--path [PATH]] [--prune]
serve
Serve the application on the PHP development server
Options:
host
- The host address to serve the application on Optionalport
- The port to serve the application on Optionaltries
- The max number of ports to attempt to serve from Optionalno-reload
- Do not reload the development server on .env file changes Optional
php artisan serve [--host [HOST]] [--port [PORT]] [--tries [TRIES]] [--no-reload]
session:table
Create a migration for the session database table
php artisan session:table
storage:link
Create the symbolic links configured for the application
Options:
relative
- Create the symbolic link using relative paths Optional
php artisan storage:link [--relative]
stub:publish
Publish all stubs that are available for customization
Options:
force
- Overwrite any existing files Optional
php artisan stub:publish [--force]
test
Run the application tests
Options:
without-tty
- Disable output to TTY Optionalparallel
- Indicates if the tests should run in parallel Optionalrecreate-databases
- Indicates if the test databases should be re-created Optional
php artisan test [--without-tty] [--parallel] [--recreate-databases]
tinker
Interact with your application
Options:
execute
- Execute the given code using Tinker Optional
Arguments:
include
- Include file(s) before starting tinker Optional
php artisan tinker [--execute [EXECUTE]] [--] [<include>...]
up
Bring the application out of maintenance mode
php artisan up
vendor:publish
Publish any publishable assets from vendor packages
Options:
force
- Overwrite any existing files Optionalall
- Publish assets for all service providers without prompt Optionalprovider
- The service provider that has assets you want to publish Optionaltag
- One or many tags that have assets you want to publish Optional
php artisan vendor:publish [--force] [--all] [--provider [PROVIDER]] [--tag [TAG]]
view:cache
Compile all of the application's Blade templates
php artisan view:cache
view:clear
Clear all compiled view files
php artisan view:clear