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

Bossino's avatar

Laravel ESCPOS

Hello. Is there is any tutorial on using ESCPOS in Laravel? All I see are php escpos. I decided to use it so that the silent printing will be effective. Also, I'm also searching on how to design a layout in escpos.

0 likes
10 replies
jlrdw's avatar

If you cannot find a laravel package, you are okay with php escpos. Laravel is a php framework, so things will work without being laravel specific.

Bossino's avatar

Okay sir. I'll reading its docs, forums, etc and figuring out on how to use it in laravel. I'm working its code in my controller. Now, I'm also figuring out if I can use my html layout for printing its receipt in escpos and it seems difficult for me.

jlrdw's avatar

Don't forget, blade compiles to PHP, and even in Blade you can write some normal PHP if needed.

@php
// your php here
@endphp

See the chapter on blade in the docs.

Bossino's avatar

Okay sir thanks for helping sir. I'll write the codes there and see if will work.

Bossino's avatar

Thank you for sharing it. I will study that one. If I deploy my website on the server it would print it to any thermal printer?

programmer_asa's avatar

Hello, sorry to join the party so late. There is several tutorial on using ESCPOS in Laravel. There's a library which brings us escpos-php to Laravel.

https://github.com/rawilk/laravel-printing

https://github.com/mike42/escpos-php

https://www.neodynamic.com/articles/How-to-print-raw-ESC-POS-commands-from-PHP-directly-to-the-client-printer/

https://www.neodynamic.com/products/printing/raw-data/php/

I hope this information is useful to you :)

kyleexkyle's avatar

@ljsharp yes ,just trigger the print somewhere on your backend like the controller or an action

Please or to participate in this conversation.