Learn how Laravel QR Code data types encode structured information into standard QR payloads, with a guide to every available type.
Data types are purpose-built helpers that transform structured information — like a contact card, a cryptocurrency address, or a Wi-Fi credential — into the standardised QR payload format that scanner apps understand natively. Instead of assembling URI strings by hand, you call a named method and pass typed arguments; the package handles encoding, escaping, and spec compliance for you.Every data type method returns a QrCodeResult, which means you can chain rendering or saving calls directly onto the result without any intermediate steps.
All data type methods return a QrCodeResult instance, so you can immediately render or save the output: QrCode::Email('hi@example.com')->generate() works just as well as storing the result first.
All data types validate their inputs strictly and throw typed exceptions on invalid values. Always wrap user-supplied input in a try/catch block to handle validation errors gracefully.