I'm using Laravel and https://github.com/milon/barcode to generate barcodes. From an API I got string but not the format.
How to recognize which format is because if I put the wrong format, my function which generates PDF fail. Is there any PHP to recognize barcode format based on a string?