Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

boyjarv's avatar

how to console log in laravel?

How can I console.log in Laravel?

I was doing something like this last week?! ... not working now

console.info(['here'])

0 likes
3 replies
Snapey's avatar

don't forget that console logging is for javascript.

if you mean sending messages to the server console from artisan commands then its $this->info('hello');

bigtank's avatar

It's better to dd or dump. If you use vuejs or any other frontend framework alongside laravel, then you can just console.log() the response laravel retrieves.

Please or to participate in this conversation.