How do I write to the console from a Laravel Controller?

Last Updated: May 10, 2020

When you are debuging Laravel code , you may need to get some output from command window where you run the artisan command

error_log('Some message here.');

Run this code inside your php function and you can see the output in terminal