Ctrl+K

_complete

Internal command to provide shell completion suggestions

Options

  • api-version - The API version of the completion script Required
  • current - The index of the "input" array that the cursor is in (e.g. COMP_CWORD) Required
  • input - An array of input tokens (e.g. COMP_WORDS or argv) Required
  • shell - The shell type ("bash", "fish", "zsh") Required
  • symfony - 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 Optional
  • only - 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 Optional
  • write - 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 Optional
  • section - 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 Optional
  • refresh - The number of seconds after which the browser may refresh Optional
  • render - The view that should be prerendered for display during maintenance mode Optional
  • retry - The number of seconds after which the request may be retried Optional
  • secret - The secret phrase that may be used to bypass maintenance mode Optional
  • status - The status code that should be used when returning the maintenance mode response Optional
  • with-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 Optional
  • without-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) Required
  • raw - 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) Required
  • raw - To output raw command list Optional
  • short - 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 Optional
  • force - Force the operation to run when in production Optional
  • graceful - Return a successful exit code even if an error occurs Optional
  • isolated - Do not run the command if another instance of the command is already running Optional
  • path - The path(s) to the migrations files to be executed Optional
  • pretend - Dump the SQL queries that would be run Optional
  • realpath - Indicate any provided migration file paths are pre-resolved absolute paths Optional
  • schema-path - The path to a schema dump file Optional
  • seed - Indicates if the seed task should be re-run Optional
  • seeder - The class name of the root seeder Optional
  • step - 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 Optional
  • filter - Filter the logs by the given value Optional
  • level - Filter the logs by the given level Optional
  • message - Filter the logs by the given message Optional
  • timeout - The maximum execution time in seconds Optional
  • user - 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 Optional
  • no-reload - Do not reload the development server on .env file changes Optional
  • port - The port to serve the application on Optional
  • tries - 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 Optional
  • coverage - Indicates whether code coverage information should be collected Optional
  • drop-databases - Indicates if the test databases should be dropped Optional
  • min - Indicates the minimum threshold enforcement for code coverage Optional
  • parallel - Indicates if the tests should run in parallel Optional
  • profile - Lists top 10 slowest tests Optional
  • recreate-databases - Indicates if the test databases should be re-created Optional
  • without-databases - Indicates if database configuration should be performed Optional
  • without-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 Optional
  • dark - Indicate that dark mode support should be installed Optional
  • eslint - Indicates if ESLint with Prettier should be installed Optional
  • pest - Indicate that Pest should be installed Optional
  • ssr - Indicates if Inertia SSR support should be installed Optional
  • typescript - 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 Required
  • store - 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 Optional
  • disabled - Immediately disable the webhook after creation Optional
  • url - 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 Optional
  • force - 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 Optional
  • max - 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 Optional
  • database - The database connection to seed Optional
  • force - 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 </> Optional
  • database - The database connection Optional
  • json - Output the database information as JSON Optional
  • types - Show the user defined types Optional
  • views - 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 Optional
  • json - 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 Optional
  • drop-types - Drop all tables and types (Postgres only) Optional
  • drop-views - Drop all tables and views Optional
  • force - 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 Optional
  • detect - Detect the installed Chrome / Chromium version Optional
  • proxy - The proxy to download the binary through (example: "tcp://127.0.0.1:9000") Optional
  • ssl-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 Optional
  • pest - Run the tests using Pest Optional
  • without-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") Optional
  • ssl-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 Optional
  • env - The environment to be decrypted Optional
  • filename - Filename of the decrypted file Optional
  • force - Overwrite the existing environment file Optional
  • key - The encryption key Optional
  • path - 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 Optional
  • env - The environment to be encrypted Optional
  • force - Overwrite the existing encrypted environment file Optional
  • key - The encryption key Optional
  • prune - 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 Optional
  • json - 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 Optional
  • queue - 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 Optional
  • backoff - The number of seconds to wait before retrying a job that encountered an uncaught exception Optional
  • balance - The balancing strategy the supervisor should apply Optional
  • balance-cooldown - The number of seconds to wait in between auto-scaling attempts Optional
  • balance-max-shift - The maximum number of processes to increase or decrease per one scaling Optional
  • delay - The number of seconds to delay failed jobs (Deprecated) Optional
  • force - Force the worker to run even in maintenance mode Optional
  • max-jobs - The number of jobs to process before stopping a child process Optional
  • max-processes - The maximum number of total workers to start Optional
  • max-time - The maximum number of seconds a child process should run Optional
  • memory - The memory limit in megabytes Optional
  • min-processes - The minimum number of workers to assign per queue Optional
  • nice - The process priority Optional
  • parent-id - The parent process ID Optional
  • paused - Start the supervisor in a paused state Optional
  • queue - The names of the queues to work Optional
  • rest - Number of seconds to rest between jobs Optional
  • sleep - Number of seconds to sleep when no job is available Optional
  • timeout - The number of seconds a child process can run Optional
  • tries - Number of times to attempt a job before logging it failed Optional
  • workers-name - The name that should be assigned to the workers Optional

Arguments

  • name - The name of supervisor Required
  • connection - 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 Optional
  • daemon - Run the worker in daemon mode (Deprecated) Optional
  • delay - The number of seconds to delay failed jobs (Deprecated) Optional
  • force - Force the worker to run even in maintenance mode Optional
  • max-jobs - The number of jobs to process before stopping Optional
  • max-time - The maximum number of seconds the worker should run Optional
  • memory - The memory limit in megabytes Optional
  • name - The name of the worker Optional
  • once - Only process the next job on the queue Optional
  • queue - The names of the queues to work Optional
  • rest - Number of seconds to rest between jobs Optional
  • sleep - Number of seconds to sleep when no job is available Optional
  • stop-when-empty - Stop when the queue is empty Optional
  • supervisor - The name of the supervisor the worker belongs to Optional
  • timeout - The number of seconds a child process can run Optional
  • tries - 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 Optional
  • force - Overwrite any existing API routes file Optional
  • passport - Install Laravel Passport instead of Laravel Sanctum Optional
  • without-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 Optional
  • force - Overwrite any existing broadcasting routes file Optional
  • without-node - Do not prompt to install Node dependencies Optional
  • without-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 Optional
  • composer - Absolute path to the Composer binary which should be used to install packages Optional
  • dark - Indicate that dark mode support should be installed Optional
  • pest - Indicates if Pest should be installed Optional
  • ssr - Indicates if Inertia SSR support should be installed Optional
  • teams - Indicates if team support should be installed Optional
  • verification - 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 Optional
  • show - 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 Optional
  • force - 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 Optional
  • inbound - 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 Optional
  • invokable - 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 Optional
  • force - Create the class even if the console command already exists Optional
  • pest - Generate an accompanying Pest test for the Console command Optional
  • phpunit - Generate an accompanying PHPUnit test for the Console command Optional
  • test - 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 Optional
  • inline - Create a component that renders an inline view Optional
  • path - The location where the component view should be created Required
  • pest - Generate an accompanying Pest test for the Component Optional
  • phpunit - Generate an accompanying PHPUnit test for the Component Optional
  • test - Generate an accompanying Test test for the Component Optional
  • view - 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 Optional
  • creatable - Indicate that a singleton resource should be creatable Optional
  • force - Create the class even if the controller already exists Optional
  • invokable - Generate a single method, invokable controller class Optional
  • model - Generate a resource controller for the given model Optional
  • parent - Generate a nested resource controller class Optional
  • pest - Generate an accompanying Pest test for the Controller Optional
  • phpunit - Generate an accompanying PHPUnit test for the Controller Optional
  • requests - Generate FormRequest classes for store and update Optional
  • resource - Generate a resource controller class Optional
  • singleton - Generate a singleton resource controller class Optional
  • test - Generate an accompanying Test test for the Controller Optional
  • type - 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 Optional
  • int - Generate an integer backed enum. Optional
  • string - 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 Optional
  • render - Create the exception with an empty render method Optional
  • report - 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 Optional
  • pest - Generate an accompanying Pest test for the Job Optional
  • phpunit - Generate an accompanying PHPUnit test for the Job Optional
  • sync - Indicates that job should be synchronous Optional
  • test - 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 Optional
  • pest - Generate an accompanying Pest test for the Middleware Optional
  • phpunit - Generate an accompanying PHPUnit test for the Middleware Optional
  • test - 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 Optional
  • force - Create the class even if the listener already exists Optional
  • pest - Generate an accompanying Pest test for the Listener Optional
  • phpunit - Generate an accompanying PHPUnit test for the Listener Optional
  • queued - Indicates the event listener should be queued Optional
  • test - 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 Optional
  • markdown - Create a new Markdown template for the mailable Optional
  • pest - Generate an accompanying Pest test for the Mailable Optional
  • phpunit - Generate an accompanying PHPUnit test for the Mailable Optional
  • test - Generate an accompanying Test test for the Mailable Optional
  • view - 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 Optional
  • phpunit - Generate an accompanying PHPUnit test for the Middleware Optional
  • test - 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 Optional
  • fullpath - Output the full path of the migration (Deprecated) Optional
  • path - The location where the migration file should be created Optional
  • realpath - Indicate any provided migration file paths are pre-resolved absolute paths Optional
  • table - 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 Optional
  • api - Indicates if the generated controller should be an API resource controller Optional
  • controller - Create a new controller for the model Optional
  • factory - Create a new factory for the model Optional
  • force - Create the class even if the model already exists Optional
  • migration - Create a new migration file for the model Optional
  • morph-pivot - Indicates if the generated model should be a custom polymorphic intermediate table model Optional
  • pest - Generate an accompanying Pest test for the Model Optional
  • phpunit - Generate an accompanying PHPUnit test for the Model Optional
  • pivot - Indicates if the generated model should be a custom intermediate table model Optional
  • policy - Create a new policy for the model Optional
  • requests - Create new form request classes and use them in the resource controller Optional
  • resource - Indicates if the generated controller should be a resource controller Optional
  • seed - Create a new seeder for the model Optional
  • test - 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 Optional
  • markdown - Create a new Markdown template for the notification Optional
  • pest - Generate an accompanying Pest test for the Notification Optional
  • phpunit - Generate an accompanying PHPUnit test for the Notification Optional
  • test - 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 Optional
  • model - 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 Optional
  • guard - The guard that the policy relies on Optional
  • model - 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 Optional
  • force - 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 Optional
  • implicit - 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 Optional
  • pest - Create a Pest test Optional
  • phpunit - Create a PHPUnit test Optional
  • unit - 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 Optional
  • force - Create the view even if the view already exists Optional
  • pest - Generate an accompanying Pest test for the View Optional
  • phpunit - Generate an accompanying PHPUnit test for the View Optional
  • test - 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 Optional
  • drop-types - Drop all tables and types (Postgres only) Optional
  • drop-views - Drop all tables and views Optional
  • force - Force the operation to run when in production Optional
  • path - The path(s) to the migrations files to be executed Optional
  • realpath - Indicate any provided migration file paths are pre-resolved absolute paths Optional
  • schema-path - The path to a schema dump file Optional
  • seed - Indicates if the seed task should be re-run Optional
  • seeder - The class name of the root seeder Optional
  • step - 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 Optional
  • force - Force the operation to run when in production Optional
  • path - The path(s) to the migrations files to be executed Optional
  • realpath - Indicate any provided migration file paths are pre-resolved absolute paths Optional
  • seed - Indicates if the seed task should be re-run Optional
  • seeder - The class name of the root seeder Optional
  • step - 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 Optional
  • force - Force the operation to run when in production Optional
  • path - The path(s) to the migrations files to be executed Optional
  • pretend - Dump the SQL queries that would be run Optional
  • realpath - 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 Required
  • database - The database connection to use Optional
  • force - Force the operation to run when in production Optional
  • path - The path(s) to the migrations files to be executed Optional
  • pretend - Dump the SQL queries that would be run Optional
  • realpath - Indicate any provided migration file paths are pre-resolved absolute paths Optional
  • step - 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 Optional
  • path - The path(s) to the migrations files to use Optional
  • pending - Only list pending migrations Optional
  • realpath - 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 Optional
  • except - Class names of the models to be excluded from pruning Optional
  • model - Class names of the models to be pruned Optional
  • path - Absolute path(s) to directories where models are located Optional
  • pretend - 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 Optional
  • json - 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 - Optional
  • auth-timeout - Optional
  • base-url - Optional
  • ingest-connection-timeout - Optional
  • ingest-timeout - Optional
  • listen-on - Optional
  • server - 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 Optional
  • name - The name of the client Optional
  • password - Create a password grant client Optional
  • personal - Create a personal access token client Optional
  • provider - The name of the user provider Optional
  • public - Create a public client (Auth code grant type only) Optional
  • redirect_uri - The URI to redirect to after authorization Optional
  • user_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 Optional
  • length - The length of the private key Optional
  • uuids - 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 Optional
  • length - 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 Optional
  • hours - The number of hours to retain expired tokens Optional
  • revoked - 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 Optional
  • except-registered - Purge all features except those registered Optional
  • store - 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 Optional
  • queue - 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 Optional
  • delay - The number of seconds to delay failed jobs (Deprecated) Optional
  • force - Force the worker to run even in maintenance mode Optional
  • memory - The memory limit in megabytes Optional
  • name - The name of the worker Optional
  • queue - The queue to listen on Optional
  • rest - Number of seconds to rest between jobs Optional
  • sleep - Number of seconds to sleep when no job is available Optional
  • timeout - The number of seconds a child process can run Optional
  • tries - 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 Optional
  • hours - The number of hours to retain batch data Optional
  • unfinished - 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 Optional
  • range - 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 Optional
  • daemon - Run the worker in daemon mode (Deprecated) Optional
  • delay - The number of seconds to delay failed jobs (Deprecated) Optional
  • force - Force the worker to run even in maintenance mode Optional
  • json - Output the queue worker information as JSON Optional
  • max-jobs - The number of jobs to process before stopping Optional
  • max-time - The maximum number of seconds the worker should run Optional
  • memory - The memory limit in megabytes Optional
  • name - The name of the worker Optional
  • once - Only process the next job on the queue Optional
  • queue - The names of the queues to work Optional
  • rest - Number of seconds to rest between jobs Optional
  • sleep - Number of seconds to sleep when no job is available Optional
  • stop-when-empty - Stop when the queue is empty Optional
  • timeout - The number of seconds a child process can run Optional
  • tries - 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 Optional
  • domain - Filter the routes by domain Optional
  • except-path - Do not display the routes matching the given path pattern Optional
  • except-vendor - Do not display routes defined by vendor packages Optional
  • json - Output the route list as JSON Optional
  • method - Filter the routes by method Optional
  • name - Filter the routes by name Optional
  • only-vendor - Only display routes defined by vendor packages Optional
  • path - Only show routes matching the given path pattern Optional
  • reverse - Reverse the ordering of the routes Optional
  • sort - 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 Optional
  • php - The PHP version that should be used Optional
  • with - 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 - Required
  • code - 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 Optional
  • timezone - 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 Optional
  • path - The path where the schema dump file should be stored Optional
  • prune - 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 Optional
  • relative - 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 Optional
  • force - 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 Optional
  • existing - Publish and overwrite only the files that have already been published Optional
  • force - Overwrite any existing files Optional
  • provider - The service provider that has assets you want to publish Optional
  • tag - 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