//run following command to install it
composer require milon/barcode
//then pass the value of which barcode is to generate
//for example if i am to generate barcode for "muhammad ishaq" then
$value = "muhammad ishaq";
//2D barcode
echo DNS2D::getBarcodeHTML($value, 'QRCODE');
//1D barcode
echo DNS1D::getBarcodeHTML($value, 'C39');