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

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

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

Tagged