PHP code example of dominik-eller / laravel-qr-code
1. Go to this page and download the library: Download dominik-eller/laravel-qr-code library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Deller\QrCode\QrCode as BaseQrCode;
class VCardQrCode extends BaseQrCode
{
public function getData(): string
{
return "BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nEND:VCARD";
}
}
QrCode::registerType(‘vcard’, VCardQrCode::class);
$qrCode = QrCode::create(‘vcard’)->generate();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.