This is a Laravel web app serving as an example to use the Laravel Receipt Printer package.
I have tested this app successfully in the following environment:
- macOS 14.5 (Sonoma)
- PHP 8
- Laravel 10
- Epson TM-T82 receipt printer, connected via USB
Follow these steps:
- Clone this repository into a directory on your local computer
- Open Terminal (macOS, Linux) or Git Bash (Windows)
- Use
cd
command to change directory into the cloned repository - Use
composer install
command to install the dependencies - Use
php artisan serve
command to run PHP built-in server - Make sure that a receipt printer has been connected to your computer
- Change the config inside
config/receiptprinter.php
according to your own environment, e.g theconnector_descriptor
should be your printer name - Open your web browser and point to:
http://127.0.0.1/print/test
- A sample receipt should be printed on your receipt printer
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
The Laravel framework is open-sourced software licensed under the MIT license.