Level 50
var_dump($foo, 'bar');
dd('foo', $bar);
<script>
console.log('{{ $foobar }}');
</script>
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
OK, seems simple, don't know why I can't figure this out:
In javascript I am doing console.log(['my debug message', 'second message']); How do I do the same thing in laravel (PHP)? I'm thinking there's a simple built in helper function?
My default browser is Chrome, and I have chrome dev tools installed.
Or you can use dump which doesn't stop your application like dd() and die() does
dump('some message', 'second message');
Please or to participate in this conversation.