Skip to content
Advertisement

Tag: printing

How to print out value on controller Laravel?

I’m beginner on Laravel… How to debug some value on controller in Laravel, result can show to console like syntax console.log() on javascript? example controller function : Answer In Laravel use dd($id) or if you don’t want to halt the execution, you can use dump($var). You can still always use PHP’s native functions like var_dump, die and print_r.

output printer ESC codes from twig in Symfony

I have a system that uses Symfony, and is connected to a (citizen ct-s2000) POS printer. What I currently do is render the string to send to the printer, using the twig service: and send this to the printer using fwrite, after that I feed the paper 1 line and cut the paper using: This all works like a charm,

Advertisement