write to console larav code example
Example 1: laravel log to console
error_log('Some message here.');
Example 2: laravel app running in console
app()->runningInConsole()
error_log('Some message here.');
app()->runningInConsole()