I'm running Windows 10, my Laravel app runs inside vagrant/laravel
homestead using virtual box.
I need to connect a printer to print out receipts using this package ESCPOS-PHP I tried this using XAMPP it works, but I don't know to make it work when my application is running inside vagrant/laravel
homestead
CodePudding user response:
I should warn you that the laravel homestead environment is meant only for development and not production. However if you want to connect any device to the vagrant box you can opt for enabling the gui configuration adding
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
at the end of the file named Vagrantfile
. This option will have as a result to start Homestead in a VirtualBox window allowing you to attach usb devices by right clicking on the USB connector icon at the lower right of the window.
Bear in mind that VirtualBox has support only for USB 1.1 if you haven't installed the VirtualBox Extension Pack. Downloading the Extension Pack and installing it enables USB2.x and 3.x support.
Make sure that the printer is supported in Linux as making the connection is only part of the problem. The Open Printing site has support status for most printers.