I am building an application that uses thermal printer and I found the Mike42/Escpos library.
I am using laravel for my application
I have installed the library in my application
but I am getting the following error.
Class 'Mike42\Escpos\PrintConnectors\FilePrintConnector' not found
Composer.json
{
"require": {
"spatie/laravel-backup": "^6.11",
"mike42/escpos-php": "^3.0"
}
}
Web.php
use Illuminate\Support\Facades\Route;
use Mike42\Escpos\PrintConnectors\FilePrintConnector;
use Mike42\Escpos\Printer;
Route::get('/', function () {
$connector = new FilePrintConnector("XP-58IIH");
$printer = new Printer($connector);
$printer -> text("Hello World!\n");
$printer -> cut();
$printer -> close();
});
How do I solve this problem?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire