Commands (161)
_completeaboutclear-compiledcompletiondbdocsdownduskenvhelphorizoninspireinvoke-serialized-closurelistmigrateoptimizepailservetesttinkerup
auth (1)
auth:clear-resetsbreeze (1)
breeze:installcashier (1)
cashier:webhookchannel (1)
channel:listfortify (1)
fortify:installhorizon (19)
horizon:clearhorizon:clear-metricshorizon:continuehorizon:continue-supervisorhorizon:forgethorizon:installhorizon:listhorizon:pausehorizon:pause-supervisorhorizon:publishhorizon:purgehorizon:snapshothorizon:statushorizon:supervisorhorizon:supervisor-statushorizon:supervisorshorizon:terminatehorizon:timeouthorizon:workjetstream (1)
jetstream:installkey (1)
key:generatelang (1)
lang:publishmake (36)
make:cache-tablemake:castmake:channelmake:classmake:commandmake:componentmake:controllermake:enummake:eventmake:exceptionmake:factorymake:interfacemake:jobmake:job-middlewaremake:listenermake:mailmake:middlewaremake:migrationmake:modelmake:notificationmake:notifications-tablemake:observermake:policymake:providermake:queue-batches-tablemake:queue-failed-tablemake:queue-tablemake:requestmake:resourcemake:rulemake:scopemake:seedermake:session-tablemake:testmake:traitmake:viewnightwatch (1)
nightwatch:agentoptimize (1)
optimize:clearpackage (1)
package:discoverqueue (12)
queue:clearqueue:failedqueue:flushqueue:forgetqueue:listenqueue:monitorqueue:prune-batchesqueue:prune-failedqueue:restartqueue:retryqueue:retry-batchqueue:workschedule (7)
schedule:clear-cacheschedule:finishschedule:interruptschedule:listschedule:runschedule:testschedule:workschema (1)
schema:dumpstub (1)
stub:publishvendor (1)
vendor:publish_complete
Internal command to provide shell completion suggestions
Options
api-version
- The API version of the completion script Requiredcurrent
- The index of the "input" array that the cursor is in (e.g. COMP_CWORD) Requiredinput
- An array of input tokens (e.g. COMP_WORDS or argv) Requiredshell
- The shell type ("bash", "fish", "zsh") Requiredsymfony
- deprecated Required
php artisan _complete [-s|--shell SHELL] [-i|--input INPUT] [-c|--current CURRENT] [-a|--api-version API-VERSION] [-S|--symfony SYMFONY]
about
Display basic information about your application
Options
json
- Output the information as JSON Optionalonly
- The section to display Optional
php artisan about [--only [ONLY]] [--json]
clear-compiled
Remove the compiled class file
php artisan clear-compiled
completion
Dump the shell completion script
Options
debug
- Tail the completion debug log Optional
Arguments
shell
- The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given Optional
php artisan completion [--debug] [--] [<shell>]
db
Start a new database CLI session
Options
read
- Connect to the read connection Optionalwrite
- Connect to the write connection Optional
Arguments
connection
- The database connection that should be used Optional
php artisan db [--read] [--write] [--] [<connection>]
docs
Access the Laravel documentation
Arguments
page
- The documentation page to open Optionalsection
- The section of the page to open Optional
php artisan docs [<page> [<section>]]
down
Put the application into maintenance / demo mode
Options
redirect
- The path that users should be redirected to Optionalrefresh
- The number of seconds after which the browser may refresh 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 Optionalwith-secret
- Generate a random secret phrase that may be used to bypass maintenance mode Optional
php artisan down [--redirect [REDIRECT]] [--render [RENDER]] [--retry [RETRY]] [--refresh [REFRESH]] [--secret [SECRET]] [--with-secret] [--status [STATUS]]
dusk
Run the Dusk tests for the application
Options
browse
- Open a browser instead of using headless mode Optionalwithout-tty
- Disable output to TTY Optional
php artisan dusk [--browse] [--without-tty]
env
Display the current framework environment
php artisan env
help
Display 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>]
horizon
Start a master supervisor in the foreground
Options
environment
- The environment name Optional
php artisan horizon [--environment [ENVIRONMENT]]
inspire
Display an inspiring quote
php artisan inspire
invoke-serialized-closure
Invoke the given serialized closure
Arguments
code
- The serialized closure Optional
php artisan invoke-serialized-closure [<code>]
list
List commands
Options
format
- The output format (txt, xml, json, or md) Requiredraw
- To output raw command list Optionalshort
- To skip describing commands' arguments Optional
Arguments
namespace
- The namespace name Optional
php artisan list [--raw] [--format FORMAT] [--short] [--] [<namespace>]
migrate
Run the database migrations
Options
database
- The database connection to use Optionalforce
- Force the operation to run when in production Optionalgraceful
- Return a successful exit code even if an error occurs Optionalisolated
- Do not run the command if another instance of the command is already running Optionalpath
- The path(s) to the migrations files to be executed Optionalpretend
- Dump the SQL queries that would be run 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 [--database [DATABASE]] [--force] [--path [PATH]] [--realpath] [--schema-path [SCHEMA-PATH]] [--pretend] [--seed] [--seeder [SEEDER]] [--step] [--graceful] [--isolated [ISOLATED]]
optimize
Cache framework bootstrap, configuration, and metadata to increase performance
Options
except
- Do not run the commands matching the key or name Optional
php artisan optimize [-e|--except [EXCEPT]]
pail
Tails the application logs.
Options
auth
- Filter the logs by the given authenticated ID Optionalfilter
- Filter the logs by the given value Optionallevel
- Filter the logs by the given level Optionalmessage
- Filter the logs by the given message Optionaltimeout
- The maximum execution time in seconds Optionaluser
- Filter the logs by the given authenticated ID (alias for --auth) Optional
php artisan pail [--filter [FILTER]] [--message [MESSAGE]] [--level [LEVEL]] [--auth [AUTH]] [--user [USER]] [--timeout [TIMEOUT]]
serve
Serve the application on the PHP development server
Options
host
- The host address to serve the application on Optionalno-reload
- Do not reload the development server on .env file changes Optionalport
- The port to serve the application on Optionaltries
- The max number of ports to attempt to serve from Optional
php artisan serve [--host [HOST]] [--port [PORT]] [--tries [TRIES]] [--no-reload]
test
Run the application tests
Options
compact
- Indicates whether the compact printer should be used Optionalcoverage
- Indicates whether code coverage information should be collected Optionaldrop-databases
- Indicates if the test databases should be dropped Optionalmin
- Indicates the minimum threshold enforcement for code coverage Optionalparallel
- Indicates if the tests should run in parallel Optionalprofile
- Lists top 10 slowest tests Optionalrecreate-databases
- Indicates if the test databases should be re-created Optionalwithout-databases
- Indicates if database configuration should be performed Optionalwithout-tty
- Disable output to TTY Optional
php artisan test [--without-tty] [--compact] [--coverage] [--min [MIN]] [-p|--parallel] [--profile] [--recreate-databases] [--drop-databases] [--without-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
auth:clear-resets
Flush expired password reset tokens
Arguments
name
- The name of the password broker Optional
php artisan auth:clear-resets [<name>]
breeze:install
Install the Breeze controllers and resources
Options
composer
- Absolute path to the Composer binary which should be used to install packages Optionaldark
- Indicate that dark mode support should be installed Optionaleslint
- Indicates if ESLint with Prettier should be installed Optionalpest
- Indicate that Pest should be installed Optionalssr
- Indicates if Inertia SSR support should be installed Optionaltypescript
- Indicates if TypeScript is preferred for the Inertia stack Optional
Arguments
stack
- The development stack that should be installed (blade,livewire,livewire-functional,react,vue,api) Required
php artisan breeze:install [--dark] [--pest] [--ssr] [--typescript] [--eslint] [--composer [COMPOSER]] [--] <stack>
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:prune-stale-tags
Prune stale cache tags from the cache (Redis only)
Arguments
store
- The name of the store you would like to prune tags from Optional
php artisan cache:prune-stale-tags [<store>]
cashier:webhook
Create the Stripe webhook to interact with Cashier.
Options
api-version
- The Stripe API version the webhook should use Optionaldisabled
- Immediately disable the webhook after creation Optionalurl
- The URL endpoint for the webhook Optional
php artisan cashier:webhook [--disabled] [--url [URL]] [--api-version [API-VERSION]]
channel:list
List all registered private broadcast channels
php artisan channel:list
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
config:publish
Publish configuration files to your application
Options
all
- Publish all configuration files Optionalforce
- Overwrite any existing configuration files Optional
Arguments
name
- The name of the configuration file to publish Optional
php artisan config:publish [--all] [--force] [--] [<name>]
config:show
Display all of the values for a given configuration file or key
Arguments
config
- The configuration file or key to show Required
php artisan config:show <config>
db:monitor
Monitor the number of connections on the specified database
Options
databases
- The database connections to monitor Optionalmax
- The maximum number of connections that can be open before an event is dispatched Optional
php artisan db:monitor [--databases [DATABASES]] [--max [MAX]]
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
Arguments
class
- The class name of the root seeder Optional
php artisan db:seed [--class [CLASS]] [--database [DATABASE]] [--force] [--] [<class>]
db:show
Display information about the given database
Options
counts
- Show the table row count <bg=red;options=bold> Note: This can be slow on large databases </> Optionaldatabase
- The database connection Optionaljson
- Output the database information as JSON Optionaltypes
- Show the user defined types Optionalviews
- Show the database views <bg=red;options=bold> Note: This can be slow on large databases </> Optional
php artisan db:show [--database [DATABASE]] [--json] [--counts] [--views] [--types]
db:table
Display information about the given database table
Options
database
- The database connection Optionaljson
- Output the table information as JSON Optional
Arguments
table
- The name of the table Optional
php artisan db:table [--database [DATABASE]] [--json] [--] [<table>]
db:wipe
Drop all tables, views, and types
Options
database
- The database connection to use Optionaldrop-types
- Drop all tables and types (Postgres only) Optionaldrop-views
- Drop all tables and views Optionalforce
- Force the operation to run when in production Optional
php artisan db:wipe [--database [DATABASE]] [--drop-views] [--drop-types] [--force]
dusk:chrome-driver
Install the ChromeDriver binary
Options
all
- Install a ChromeDriver binary for every OS Optionaldetect
- Detect the installed Chrome / Chromium version Optionalproxy
- The proxy to download the binary through (example: "tcp://127.0.0.1:9000") Optionalssl-no-verify
- Bypass SSL certificate verification when installing through a proxy Optional
Arguments
version
- Optional
php artisan dusk:chrome-driver [--all] [--detect] [--proxy [PROXY]] [--ssl-no-verify] [--] [<version>]
dusk:component
Create a new Dusk component class
Arguments
name
- The name of the class Required
php artisan dusk:component <name>
dusk:fails
Run the failing Dusk tests from the last run and stop on failure
Options
browse
- Open a browser instead of using headless mode Optionalpest
- Run the tests using Pest Optionalwithout-tty
- Disable output to TTY Optional
php artisan dusk:fails [--browse] [--without-tty] [--pest]
dusk:install
Install Dusk into the application
Options
proxy
- The proxy to download the binary through (example: "tcp://127.0.0.1:9000") Optionalssl-no-verify
- Bypass SSL certificate verification when installing through a proxy Optional
php artisan dusk:install [--proxy [PROXY]] [--ssl-no-verify]
dusk:make
Create a new Dusk test class
Arguments
name
- The name of the class Required
php artisan dusk:make <name>
dusk:page
Create a new Dusk page class
Arguments
name
- The name of the class Required
php artisan dusk:page <name>
dusk:purge
Purge dusk test debugging files
php artisan dusk:purge
env:decrypt
Decrypt an environment file
Options
cipher
- The encryption cipher Optionalenv
- The environment to be decrypted Optionalfilename
- Filename of the decrypted file Optionalforce
- Overwrite the existing environment file Optionalkey
- The encryption key Optionalpath
- Path to write the decrypted file Optional
php artisan env:decrypt [--key [KEY]] [--cipher [CIPHER]] [--env [ENV]] [--force] [--path [PATH]] [--filename [FILENAME]]
env:encrypt
Encrypt an environment file
Options
cipher
- The encryption cipher Optionalenv
- The environment to be encrypted Optionalforce
- Overwrite the existing encrypted environment file Optionalkey
- The encryption key Optionalprune
- Delete the original environment file Optional
php artisan env:encrypt [--key [KEY]] [--cipher [CIPHER]] [--env [ENV]] [--prune] [--force]
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 Optionaljson
- Output the events and listeners as JSON Optional
php artisan event:list [--event [EVENT]] [--json]
fortify:install
Install all of the Fortify resources
php artisan fortify:install
horizon:clear
Delete all of the jobs from the specified queue
Options
force
- Force the operation to run when in production Optionalqueue
- The name of the queue to clear Optional
Arguments
connection
- The name of the queue connection Optional
php artisan horizon:clear [--queue [QUEUE]] [--force] [--] [<connection>]
horizon:clear-metrics
Delete metrics for all jobs and queues
php artisan horizon:clear-metrics
horizon:continue
Instruct the master supervisor to continue processing jobs
php artisan horizon:continue
horizon:continue-supervisor
Instruct the supervisor to continue processing jobs
Arguments
name
- The name of the supervisor to resume Required
php artisan horizon:continue-supervisor <name>
horizon:forget
Delete a failed queue job
Options
all
- Delete all failed jobs Optional
Arguments
id
- The ID of the failed job Optional
php artisan horizon:forget [--all] [--] [<id>]
horizon:install
Install all of the Horizon resources
php artisan horizon:install
horizon:list
List all of the deployed machines
php artisan horizon:list
horizon:pause
Pause the master supervisor
php artisan horizon:pause
horizon:pause-supervisor
Pause a supervisor
Arguments
name
- The name of the supervisor to pause Required
php artisan horizon:pause-supervisor <name>
horizon:publish
Publish all of the Horizon resources
php artisan horizon:publish
horizon:purge
Terminate any rogue Horizon processes
Options
signal
- The signal to send to the rogue processes Optional
php artisan horizon:purge [--signal [SIGNAL]]
horizon:snapshot
Store a snapshot of the queue metrics
php artisan horizon:snapshot
horizon:status
Get the current status of Horizon
php artisan horizon:status
horizon:supervisor
Start a new supervisor
Options
auto-scaling-strategy
- If supervisor should scale by jobs or time to complete Optionalbackoff
- The number of seconds to wait before retrying a job that encountered an uncaught exception Optionalbalance
- The balancing strategy the supervisor should apply Optionalbalance-cooldown
- The number of seconds to wait in between auto-scaling attempts Optionalbalance-max-shift
- The maximum number of processes to increase or decrease per one scaling Optionaldelay
- The number of seconds to delay failed jobs (Deprecated) Optionalforce
- Force the worker to run even in maintenance mode Optionalmax-jobs
- The number of jobs to process before stopping a child process Optionalmax-processes
- The maximum number of total workers to start Optionalmax-time
- The maximum number of seconds a child process should run Optionalmemory
- The memory limit in megabytes Optionalmin-processes
- The minimum number of workers to assign per queue Optionalnice
- The process priority Optionalparent-id
- The parent process ID Optionalpaused
- Start the supervisor in a paused state Optionalqueue
- The names of the queues to work Optionalrest
- Number of seconds to rest between jobs 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 Optionalworkers-name
- The name that should be assigned to the workers Optional
Arguments
name
- The name of supervisor Requiredconnection
- The name of the connection to work Required
php artisan horizon:supervisor [--balance [BALANCE]] [--delay [DELAY]] [--backoff [BACKOFF]] [--max-jobs [MAX-JOBS]] [--max-time [MAX-TIME]] [--force] [--max-processes [MAX-PROCESSES]] [--min-processes [MIN-PROCESSES]] [--memory [MEMORY]] [--nice [NICE]] [--paused] [--queue [QUEUE]] [--sleep [SLEEP]] [--timeout [TIMEOUT]] [--tries [TRIES]] [--auto-scaling-strategy [AUTO-SCALING-STRATEGY]] [--balance-cooldown [BALANCE-COOLDOWN]] [--balance-max-shift [BALANCE-MAX-SHIFT]] [--workers-name [WORKERS-NAME]] [--parent-id [PARENT-ID]] [--rest [REST]] [--] <name> <connection>
horizon:supervisor-status
Show the status for a given supervisor
Arguments
name
- The name of the supervisor Required
php artisan horizon:supervisor-status <name>
horizon:supervisors
List all of the supervisors
php artisan horizon:supervisors
horizon:terminate
Terminate the master supervisor so it can be restarted
Options
wait
- Wait for all workers to terminate Optional
php artisan horizon:terminate [--wait]
horizon:timeout
Get the maximum timeout for the given environment
Arguments
environment
- The environment name Optional
php artisan horizon:timeout [<environment>]
horizon:work
Start processing jobs on the queue as a daemon
Options
backoff
- The number of seconds to wait before retrying a job that encountered an uncaught exception Optionaldaemon
- Run the worker in daemon mode (Deprecated) Optionaldelay
- The number of seconds to delay failed jobs (Deprecated) Optionalforce
- Force the worker to run even in maintenance mode Optionalmax-jobs
- The number of jobs to process before stopping Optionalmax-time
- The maximum number of seconds the worker should run Optionalmemory
- The memory limit in megabytes Optionalname
- The name of the worker Optionalonce
- Only process the next job on the queue Optionalqueue
- The names of the queues to work Optionalrest
- Number of seconds to rest between jobs Optionalsleep
- Number of seconds to sleep when no job is available Optionalstop-when-empty
- Stop when the queue is empty Optionalsupervisor
- The name of the supervisor the worker belongs to 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 horizon:work [--name [NAME]] [--delay [DELAY]] [--backoff [BACKOFF]] [--max-jobs [MAX-JOBS]] [--max-time [MAX-TIME]] [--daemon] [--force] [--memory [MEMORY]] [--once] [--stop-when-empty] [--queue [QUEUE]] [--sleep [SLEEP]] [--rest [REST]] [--supervisor [SUPERVISOR]] [--timeout [TIMEOUT]] [--tries [TRIES]] [--] [<connection>]
install:api
Create an API routes file and install Laravel Sanctum or Laravel Passport
Options
composer
- Absolute path to the Composer binary which should be used to install packages Optionalforce
- Overwrite any existing API routes file Optionalpassport
- Install Laravel Passport instead of Laravel Sanctum Optionalwithout-migration-prompt
- Do not prompt to run pending migrations Optional
php artisan install:api [--composer [COMPOSER]] [--force] [--passport] [--without-migration-prompt]
install:broadcasting
Create a broadcasting channel routes file
Options
composer
- Absolute path to the Composer binary which should be used to install packages Optionalforce
- Overwrite any existing broadcasting routes file Optionalwithout-node
- Do not prompt to install Node dependencies Optionalwithout-reverb
- Do not prompt to install Laravel Reverb Optional
php artisan install:broadcasting [--composer [COMPOSER]] [--force] [--without-reverb] [--without-node]
jetstream:install
Install the Jetstream components and resources
Options
api
- Indicates if API support should be installed Optionalcomposer
- Absolute path to the Composer binary which should be used to install packages Optionaldark
- Indicate that dark mode support should be installed Optionalpest
- Indicates if Pest should be installed Optionalssr
- Indicates if Inertia SSR support should be installed Optionalteams
- Indicates if team support should be installed Optionalverification
- Indicates if email verification support should be installed Optional
Arguments
stack
- The development stack that should be installed (inertia,livewire) Required
php artisan jetstream:install [--dark] [--teams] [--api] [--verification] [--pest] [--ssr] [--composer [COMPOSER]] [--] <stack>
key:generate
Set the application key
Options
force
- Force the operation to run when in production Optionalshow
- Display the key instead of modifying files Optional
php artisan key:generate [--show] [--force]
lang:publish
Publish all language files that are available for customization
Options
existing
- Publish and overwrite only the files that have already been published Optionalforce
- Overwrite any existing files Optional
php artisan lang:publish [--existing] [--force]
make:cache-table
Create a migration for the cache database table
php artisan make:cache-table
make:cast
Create a new custom Eloquent cast class
Options
force
- Create the class even if the cast already exists Optionalinbound
- Generate an inbound cast class Optional
Arguments
name
- The name of the cast Required
php artisan make:cast [-f|--force] [--inbound] [--] <name>
make:channel
Create a new channel class
Options
force
- Create the class even if the channel already exists Optional
Arguments
name
- The name of the channel Required
php artisan make:channel [-f|--force] [--] <name>
make:class
Create a new class
Options
force
- Create the class even if the class already exists Optionalinvokable
- Generate a single method, invokable class Optional
Arguments
name
- The name of the class Required
php artisan make:class [-i|--invokable] [-f|--force] [--] <name>
make:command
Create a new Artisan command
Options
command
- The terminal command that will be used to invoke the class Optionalforce
- Create the class even if the console command already exists Optionalpest
- Generate an accompanying Pest test for the Console command Optionalphpunit
- Generate an accompanying PHPUnit test for the Console command Optionaltest
- Generate an accompanying Test test for the Console command Optional
Arguments
name
- The name of the command Required
php artisan make:command [-f|--force] [--command [COMMAND]] [--test] [--pest] [--phpunit] [--] <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 Optionalpath
- The location where the component view should be created Requiredpest
- Generate an accompanying Pest test for the Component Optionalphpunit
- Generate an accompanying PHPUnit test for the Component Optionaltest
- Generate an accompanying Test test for the Component Optionalview
- Create an anonymous component with only a view Optional
Arguments
name
- The name of the component Required
php artisan make:component [--inline] [--view] [--path PATH] [-f|--force] [--test] [--pest] [--phpunit] [--] <name>
make:controller
Create a new controller class
Options
api
- Exclude the create and edit methods from the controller Optionalcreatable
- Indicate that a singleton resource should be creatable 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 Optionalpest
- Generate an accompanying Pest test for the Controller Optionalphpunit
- Generate an accompanying PHPUnit test for the Controller Optionalrequests
- Generate FormRequest classes for store and update Optionalresource
- Generate a resource controller class Optionalsingleton
- Generate a singleton resource controller class Optionaltest
- Generate an accompanying Test test for the Controller Optionaltype
- Manually specify the controller stub file to use Required
Arguments
name
- The name of the controller Required
php artisan make:controller [--api] [--type TYPE] [--force] [-i|--invokable] [-m|--model [MODEL]] [-p|--parent [PARENT]] [-r|--resource] [-R|--requests] [-s|--singleton] [--creatable] [--test] [--pest] [--phpunit] [--] <name>
make:enum
Create a new enum
Options
force
- Create the enum even if the enum already exists Optionalint
- Generate an integer backed enum. Optionalstring
- Generate a string backed enum. Optional
Arguments
name
- The name of the enum Required
php artisan make:enum [-s|--string] [-i|--int] [-f|--force] [--] <name>
make:event
Create a new event class
Options
force
- Create the class even if the event already exists Optional
Arguments
name
- The name of the event Required
php artisan make:event [-f|--force] [--] <name>
make:exception
Create a new custom exception class
Options
force
- Create the class even if the exception already exists Optionalrender
- Create the exception with an empty render method Optionalreport
- Create the exception with an empty report method Optional
Arguments
name
- The name of the exception Required
php artisan make:exception [-f|--force] [--render] [--report] [--] <name>
make:factory
Create a new model factory
Options
model
- The name of the model Optional
Arguments
name
- The name of the factory Required
php artisan make:factory [-m|--model [MODEL]] [--] <name>
make:interface
Create a new interface
Options
force
- Create the interface even if the interface already exists Optional
Arguments
name
- The name of the interface Required
php artisan make:interface [-f|--force] [--] <name>
make:job
Create a new job class
Options
force
- Create the class even if the job already exists Optionalpest
- Generate an accompanying Pest test for the Job Optionalphpunit
- Generate an accompanying PHPUnit test for the Job Optionalsync
- Indicates that job should be synchronous Optionaltest
- Generate an accompanying Test test for the Job Optional
Arguments
name
- The name of the job Required
php artisan make:job [-f|--force] [--sync] [--test] [--pest] [--phpunit] [--] <name>
make:job-middleware
Create a new job middleware class
Options
force
- Create the class even if the job middleware already exists Optionalpest
- Generate an accompanying Pest test for the Middleware Optionalphpunit
- Generate an accompanying PHPUnit test for the Middleware Optionaltest
- Generate an accompanying Test test for the Middleware Optional
Arguments
name
- The name of the middleware Required
php artisan make:job-middleware [-f|--force] [--test] [--pest] [--phpunit] [--] <name>
make:listener
Create a new event listener class
Options
event
- The event class being listened for Optionalforce
- Create the class even if the listener already exists Optionalpest
- Generate an accompanying Pest test for the Listener Optionalphpunit
- Generate an accompanying PHPUnit test for the Listener Optionalqueued
- Indicates the event listener should be queued Optionaltest
- Generate an accompanying Test test for the Listener Optional
Arguments
name
- The name of the listener Required
php artisan make:listener [-e|--event [EVENT]] [-f|--force] [--queued] [--test] [--pest] [--phpunit] [--] <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 Optionalpest
- Generate an accompanying Pest test for the Mailable Optionalphpunit
- Generate an accompanying PHPUnit test for the Mailable Optionaltest
- Generate an accompanying Test test for the Mailable Optionalview
- Create a new Blade template for the mailable Optional
Arguments
name
- The name of the mailable Required
php artisan make:mail [-f|--force] [-m|--markdown [MARKDOWN]] [--view [VIEW]] [--test] [--pest] [--phpunit] [--] <name>
make:middleware
Create a new HTTP middleware class
Options
pest
- Generate an accompanying Pest test for the Middleware Optionalphpunit
- Generate an accompanying PHPUnit test for the Middleware Optionaltest
- Generate an accompanying Test test for the Middleware Optional
Arguments
name
- The name of the middleware Required
php artisan make:middleware [--test] [--pest] [--phpunit] [--] <name>
make:migration
Create a new migration file
Options
create
- The table to be created Optionalfullpath
- Output the full path of the migration (Deprecated) Optionalpath
- The location where the migration file should be created Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionaltable
- The table to migrate 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, policy, resource controller, and form request classes for the model Optionalapi
- Indicates if the generated controller should be an API resource controller 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 Optionalmorph-pivot
- Indicates if the generated model should be a custom polymorphic intermediate table model Optionalpest
- Generate an accompanying Pest test for the Model Optionalphpunit
- Generate an accompanying PHPUnit test for the Model Optionalpivot
- Indicates if the generated model should be a custom intermediate table model Optionalpolicy
- Create a new policy for the model Optionalrequests
- Create new form request classes and use them in the resource controller Optionalresource
- Indicates if the generated controller should be a resource controller Optionalseed
- Create a new seeder for the model Optionaltest
- Generate an accompanying Test test for the Model Optional
Arguments
name
- The name of the model Required
php artisan make:model [-a|--all] [-c|--controller] [-f|--factory] [--force] [-m|--migration] [--morph-pivot] [--policy] [-s|--seed] [-p|--pivot] [-r|--resource] [--api] [-R|--requests] [--test] [--pest] [--phpunit] [--] <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 Optionalpest
- Generate an accompanying Pest test for the Notification Optionalphpunit
- Generate an accompanying PHPUnit test for the Notification Optionaltest
- Generate an accompanying Test test for the Notification Optional
Arguments
name
- The name of the notification Required
php artisan make:notification [-f|--force] [-m|--markdown [MARKDOWN]] [--test] [--pest] [--phpunit] [--] <name>
make:notifications-table
Create a migration for the notifications table
php artisan make:notifications-table
make:observer
Create a new observer class
Options
force
- Create the class even if the observer already exists Optionalmodel
- The model that the observer applies to Optional
Arguments
name
- The name of the observer Required
php artisan make:observer [-f|--force] [-m|--model [MODEL]] [--] <name>
make:policy
Create a new policy class
Options
force
- Create the class even if the policy already exists Optionalguard
- The guard that the policy relies on Optionalmodel
- The model that the policy applies to Optional
Arguments
name
- The name of the policy Required
php artisan make:policy [-f|--force] [-m|--model [MODEL]] [-g|--guard [GUARD]] [--] <name>
make:provider
Create a new service provider class
Options
force
- Create the class even if the provider already exists Optional
Arguments
name
- The name of the provider Required
php artisan make:provider [-f|--force] [--] <name>
make:queue-batches-table
Create a migration for the batches database table
php artisan make:queue-batches-table
make:queue-failed-table
Create a migration for the failed queue jobs database table
php artisan make:queue-failed-table
make:queue-table
Create a migration for the queue jobs database table
php artisan make:queue-table
make:request
Create a new form request class
Options
force
- Create the class even if the request already exists Optional
Arguments
name
- The name of the request Required
php artisan make:request [-f|--force] [--] <name>
make:resource
Create a new resource
Options
collection
- Create a resource collection Optionalforce
- Create the class even if the resource already exists Optional
Arguments
name
- The name of the resource Required
php artisan make:resource [-f|--force] [-c|--collection] [--] <name>
make:rule
Create a new validation rule
Options
force
- Create the class even if the rule already exists Optionalimplicit
- Generate an implicit rule Optional
Arguments
name
- The name of the rule Required
php artisan make:rule [-f|--force] [-i|--implicit] [--] <name>
make:scope
Create a new scope class
Options
force
- Create the class even if the scope already exists Optional
Arguments
name
- The name of the scope Required
php artisan make:scope [-f|--force] [--] <name>
make:seeder
Create a new seeder class
Arguments
name
- The name of the seeder Required
php artisan make:seeder <name>
make:session-table
Create a migration for the session database table
php artisan make:session-table
make:test
Create a new test class
Options
force
- Create the test even if the test already exists Optionalpest
- Create a Pest test Optionalphpunit
- Create a PHPUnit test Optionalunit
- Create a unit test Optional
Arguments
name
- The name of the test Required
php artisan make:test [-f|--force] [-u|--unit] [--pest] [--phpunit] [--] <name>
make:trait
Create a new trait
Options
force
- Create the trait even if the trait already exists Optional
Arguments
name
- The name of the trait Required
php artisan make:trait [-f|--force] [--] <name>
make:view
Create a new view
Options
extension
- The extension of the generated view Optionalforce
- Create the view even if the view already exists Optionalpest
- Generate an accompanying Pest test for the View Optionalphpunit
- Generate an accompanying PHPUnit test for the View Optionaltest
- Generate an accompanying Test test for the View Optional
Arguments
name
- The name of the view Required
php artisan make:view [--extension [EXTENSION]] [-f|--force] [--test] [--pest] [--phpunit] [--] <name>
migrate:fresh
Drop all tables and re-run all migrations
Options
database
- The database connection to use Optionaldrop-types
- Drop all tables and types (Postgres only) Optionaldrop-views
- Drop all tables and views 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 Optionalpretend
- Dump the SQL queries that would be run Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optional
php artisan migrate:reset [--database [DATABASE]] [--force] [--path [PATH]] [--realpath] [--pretend]
migrate:rollback
Rollback the last database migration
Options
batch
- The batch of migrations (identified by their batch number) to be reverted Requireddatabase
- 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 Optionalpretend
- Dump the SQL queries that would be run Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optionalstep
- The number of migrations to be reverted Optional
php artisan migrate:rollback [--database [DATABASE]] [--force] [--path [PATH]] [--realpath] [--pretend] [--step [STEP]] [--batch BATCH]
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 Optionalpending
- Only list pending migrations Optionalrealpath
- Indicate any provided migration file paths are pre-resolved absolute paths Optional
php artisan migrate:status [--database [DATABASE]] [--pending [PENDING]] [--path [PATH]] [--realpath]
model:prune
Prune models that are no longer needed
Options
chunk
- The number of models to retrieve per chunk of models to be deleted Optionalexcept
- Class names of the models to be excluded from pruning Optionalmodel
- Class names of the models to be pruned Optionalpath
- Absolute path(s) to directories where models are located Optionalpretend
- Display the number of prunable records found instead of deleting them Optional
php artisan model:prune [--model [MODEL]] [--except [EXCEPT]] [--path [PATH]] [--chunk [CHUNK]] [--pretend]
model:show
Show information about an Eloquent model
Options
database
- The database connection to use Optionaljson
- Output the model as JSON Optional
Arguments
model
- The model to show Required
php artisan model:show [--database [DATABASE]] [--json] [--] <model>
nightwatch:agent
Run the Nightwatch agent.
Options
auth-connection-timeout
- Optionalauth-timeout
- Optionalbase-url
- Optionalingest-connection-timeout
- Optionalingest-timeout
- Optionallisten-on
- Optionalserver
- Optional
php artisan nightwatch:agent [--listen-on [LISTEN-ON]] [--auth-connection-timeout [AUTH-CONNECTION-TIMEOUT]] [--auth-timeout [AUTH-TIMEOUT]] [--ingest-connection-timeout [INGEST-CONNECTION-TIMEOUT]] [--ingest-timeout [INGEST-TIMEOUT]] [--server [SERVER]] [--base-url [BASE-URL]]
optimize:clear
Remove the cached bootstrap files
Options
except
- The commands to skip Optional
php artisan optimize:clear [-e|--except [EXCEPT]]
package:discover
Rebuild the cached package manifest
php artisan package:discover
passport:client
Create a client for issuing access tokens
Options
client
- Create a client credentials grant client Optionalname
- The name of the client Optionalpassword
- Create a password grant client Optionalpersonal
- Create a personal access token client Optionalprovider
- The name of the user provider Optionalpublic
- Create a public client (Auth code grant type only) Optionalredirect_uri
- The URI to redirect to after authorization Optionaluser_id
- The user ID the client should be assigned to Optional
php artisan passport:client [--personal] [--password] [--client] [--name [NAME]] [--provider [PROVIDER]] [--redirect_uri [REDIRECT_URI]] [--user_id [USER_ID]] [--public]
passport:hash
Hash all of the existing secrets in the clients table
Options
force
- Force the operation to run without confirmation prompt Optional
php artisan passport:hash [--force]
passport:install
Run the commands necessary to prepare Passport for use
Options
force
- Overwrite keys they already exist Optionallength
- The length of the private key Optionaluuids
- Use UUIDs for all client IDs Optional
php artisan passport:install [--uuids] [--force] [--length [LENGTH]]
passport:keys
Create the encryption keys for API authentication
Options
force
- Overwrite keys they already exist Optionallength
- The length of the private key Optional
php artisan passport:keys [--force] [--length [LENGTH]]
passport:purge
Purge revoked and / or expired tokens and authentication codes
Options
expired
- Only purge expired tokens and authentication codes Optionalhours
- The number of hours to retain expired tokens Optionalrevoked
- Only purge revoked tokens and authentication codes Optional
php artisan passport:purge [--revoked] [--expired] [--hours [HOURS]]
pennant:feature
Create a new feature class
Options
force
- Create the class even if the feature already exists Optional
Arguments
name
- The name of the feature Required
php artisan pennant:feature [-f|--force] [--] <name>
pennant:purge
Delete Pennant features from storage
Options
except
- The features that should be excluded from purging Optionalexcept-registered
- Purge all features except those registered Optionalstore
- The store to purge the features from Optional
Arguments
features
- The features to purge Optional
php artisan pennant:purge [--except [EXCEPT]] [--except-registered] [--store [STORE]] [--] [<features>...]
queue:clear
Delete all of the jobs from the specified queue
Options
force
- Force the operation to run when in production Optionalqueue
- The name of the queue to clear 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:flush
Flush all of the failed queue jobs
Options
hours
- The number of hours to retain failed job data Optional
php artisan queue:flush [--hours [HOURS]]
queue:forget
Delete a failed queue job
Arguments
id
- The ID of the failed job Required
php artisan queue:forget <id>
queue:listen
Listen to a given queue
Options
backoff
- The number of seconds to wait before retrying a job that encountered an uncaught exception Optionaldelay
- The number of seconds to delay failed jobs (Deprecated) Optionalforce
- Force the worker to run even in maintenance mode Optionalmemory
- The memory limit in megabytes Optionalname
- The name of the worker Optionalqueue
- The queue to listen on Optionalrest
- Number of seconds to rest between jobs 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]] [--rest [REST]] [--timeout [TIMEOUT]] [--tries [TRIES]] [--] [<connection>]
queue:monitor
Monitor the size of the specified queues
Options
max
- The maximum number of jobs that can be on the queue before an event is dispatched Optional
Arguments
queues
- The names of the queues to monitor Required
php artisan queue:monitor [--max [MAX]] [--] <queues>
queue:prune-batches
Prune stale entries from the batches database
Options
cancelled
- The number of hours to retain cancelled batch data Optionalhours
- The number of hours to retain batch data Optionalunfinished
- The number of hours to retain unfinished batch data Optional
php artisan queue:prune-batches [--hours [HOURS]] [--unfinished [UNFINISHED]] [--cancelled [CANCELLED]]
queue:prune-failed
Prune stale entries from the failed jobs table
Options
hours
- The number of hours to retain failed jobs data Optional
php artisan queue:prune-failed [--hours [HOURS]]
queue:restart
Restart queue worker daemons after their current job
php artisan queue:restart
queue:retry
Retry a failed queue job
Options
queue
- Retry all of the failed jobs for the specified queue Optionalrange
- Range of job IDs (numeric) to be retried (e.g. 1-5) Optional
Arguments
id
- The ID of the failed job or "all" to retry all jobs Optional
php artisan queue:retry [--queue [QUEUE]] [--range [RANGE]] [--] [<id>...]
queue:retry-batch
Retry the failed jobs for a batch
Options
isolated
- Do not run the command if another instance of the command is already running Optional
Arguments
id
- The ID of the batch whose failed jobs should be retried Optional
php artisan queue:retry-batch [--isolated [ISOLATED]] [--] [<id>...]
queue:work
Start processing jobs on the queue as a daemon
Options
backoff
- The number of seconds to wait before retrying a job that encountered an uncaught exception Optionaldaemon
- Run the worker in daemon mode (Deprecated) Optionaldelay
- The number of seconds to delay failed jobs (Deprecated) Optionalforce
- Force the worker to run even in maintenance mode Optionaljson
- Output the queue worker information as JSON Optionalmax-jobs
- The number of jobs to process before stopping Optionalmax-time
- The maximum number of seconds the worker should run Optionalmemory
- The memory limit in megabytes Optionalname
- The name of the worker Optionalonce
- Only process the next job on the queue Optionalqueue
- The names of the queues to work Optionalrest
- Number of seconds to rest between jobs Optionalsleep
- Number of seconds to sleep when no job is available Optionalstop-when-empty
- Stop when the queue is empty 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]] [--rest [REST]] [--timeout [TIMEOUT]] [--tries [TRIES]] [--json] [--] [<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
action
- Filter the routes by action Optionaldomain
- Filter the routes by domain Optionalexcept-path
- Do not display the routes matching the given path pattern Optionalexcept-vendor
- Do not display routes defined by vendor packages Optionaljson
- Output the route list as JSON Optionalmethod
- Filter the routes by method Optionalname
- Filter the routes by name Optionalonly-vendor
- Only display routes defined by vendor packages Optionalpath
- Only show routes matching the given path pattern Optionalreverse
- Reverse the ordering of the routes Optionalsort
- The column (domain, method, uri, name, action, middleware, definition) to sort by Optional
php artisan route:list [--json] [--method [METHOD]] [--action [ACTION]] [--name [NAME]] [--domain [DOMAIN]] [--path [PATH]] [--except-path [EXCEPT-PATH]] [-r|--reverse] [--sort [SORT]] [--except-vendor] [--only-vendor]
sail:add
Add a service to an existing Sail installation
Arguments
services
- The services that should be added Optional
php artisan sail:add [<services>]
sail:install
Install Laravel Sail's default Docker Compose file
Options
devcontainer
- Create a .devcontainer configuration directory Optionalphp
- The PHP version that should be used Optionalwith
- The services that should be included in the installation Optional
php artisan sail:install [--with [WITH]] [--devcontainer] [--php [PHP]]
sail:publish
Publish the Laravel Sail Docker files
php artisan sail:publish
schedule:clear-cache
Delete the cached mutex files created by scheduler
php artisan schedule:clear-cache
schedule:finish
Handle the completion of a scheduled command
Arguments
id
- Requiredcode
- Optional
php artisan schedule:finish <id> [<code>]
schedule:interrupt
Interrupt the current schedule run
php artisan schedule:interrupt
schedule:list
List all scheduled tasks
Options
next
- Sort the listed tasks by their next due date Optionaltimezone
- The timezone that times should be displayed in Optional
php artisan schedule:list [--timezone [TIMEZONE]] [--next]
schedule:run
Run the scheduled commands
php artisan schedule:run
schedule:test
Run a scheduled command
Options
name
- The name of the scheduled command to run Optional
php artisan schedule:test [--name [NAME]]
schedule:work
Start the schedule worker
Options
run-output-file
- The file to direct <info>schedule:run</info> output to Optional
php artisan schedule:work [--run-output-file [RUN-OUTPUT-FILE]]
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]
storage:link
Create the symbolic links configured for the application
Options
force
- Recreate existing symbolic links Optionalrelative
- Create the symbolic link using relative paths Optional
php artisan storage:link [--relative] [--force]
storage:unlink
Delete existing symbolic links configured for the application
php artisan storage:unlink
stub:publish
Publish all stubs that are available for customization
Options
existing
- Publish and overwrite only the files that have already been published Optionalforce
- Overwrite any existing files Optional
php artisan stub:publish [--existing] [--force]
vendor:publish
Publish any publishable assets from vendor packages
Options
all
- Publish assets for all service providers without prompt Optionalexisting
- Publish and overwrite only the files that have already been published Optionalforce
- Overwrite any existing files 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 [--existing] [--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