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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners