Generate standards-compliant QR codes for email, phone, SMS, WiFi, vCard, crypto wallets, calendar events, WhatsApp, Telegram, and more.
Data type methods are shorthand helpers that format a structured payload according to the relevant standard and immediately pass it to generate(), returning a QrCodeResult directly. You can chain any styling methods before calling a data type method.
Every data type method validates its inputs and throws a subclass of InvalidDataTypeArgumentException when something is wrong (empty required field, invalid format, etc.). Wrap calls that consume dynamic user input in a try/catch block.
Generate a mailto: QR code. The address, cc, and bcc values are validated with FILTER_VALIDATE_EMAIL; an invalid value throws InvalidEmailArgumentException.
Security protocol. Accepted values: WEP, WPA, WPA2, WPA3, NOPASS. WPA2 and WPA3 are normalised to WPA internally. Defaults to WPA when a password is provided and NOPASS otherwise.
The requested amount in BTC (e.g. 0.005). Must be a non-negative numeric
value. Pass as a string for very small amounts to avoid floating-point
precision issues.
Generate a MeCard QR code — a lighter contact format popular in Japan and supported by most mobile QR scanners. You may also pass a single associative array using these parameter names as keys.
Per RFC 5545, the generated iCalendar payload includes a DTSTAMP property
set to the current UTC timestamp at the moment of generation. Two calls
for the same event will therefore produce different binary output and cannot
be byte-for-byte cached. Generate CalendarEvent QR codes at request time
rather than caching the raw bytes.
use Carbon\Carbon;QrCode::CalendarEvent([ 'summary' => 'Laracon US 2025', 'description' => 'The official Laravel conference.', 'location' => 'Nashville, TN', 'start' => Carbon::create(2025, 7, 14, 9, 0, 0, 'America/Chicago'), 'end' => Carbon::create(2025, 7, 16, 17, 0, 0, 'America/Chicago'),]);
Generate a https://wa.me/ deep-link QR code that opens a WhatsApp chat. You may also pass a single associative array using phoneNumber and message as keys. The leading + is stripped automatically.
The Telegram username. The leading @ is stripped automatically if present.
Must be 5–32 characters long, start with a letter, and contain only letters,
digits, and underscores — following Telegram’s username rules. You can also
pass an associative array with a username key.