In this video we'll show you how to create your own Laravel 5 commands using php artisan. This video will teach you the following 6 topics:
Creating your command
Prompting for input
Adding a progress bar
Creating your command is very easy, you can simply use an artisan command to create a new command:
php artisan make:console SayHello
And you will have a new file created inside of your app/Console/Commands folder called SayHello.php.
Then to accept arguments in your command you can include it in the signature of your file. In order to add options you will also include this in the signature variable as discussed in the video. Lastly we teach you how to ask for user input, write out text to the console, and we'll also show you how to display a progress bar in the console in case you are running a really long task.