Category: Laravel, PHP

It provides a lot of helpful commands and to list them all you need to write in your terminal:php artisan list Before every command, you can add “help” to see all the options the command includes.

To access the values for the arguments and options added in your command you can use the argument and options method. The arguments can be accessed in the handle method of the Command class with:$this->argument('name_of_argument'); If you want to retrieve all the arguments as an array you can call the arguments method:$arguments = $this->arguments();NOTE: argument and arguments method are not the same.

You can do this by using the call method: $this->call('migrate:fresh');$this->callSilent('migrate:fresh'); callSilent is used if you want to call the command but don’t show its output.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners