Mahmoud Al-HabashOpen to new projects
  • WorkWork
  • ServicesServices
  • LabLab
  • WritingWriting
  • ContactContact
Amman--:--عربي
Writing/Livewire

Building QR Code Generator with Livewire v4

Generate QR codes dynamically.

1 February 20261 min readLivewireاقرأ بالعربية

On this page

  1. Component

Generate QR codes with Simple QrCode.

Component

php
@php
use SimpleSoftwareIO\QrCode\Facades\QrCode;

new class extends Livewire\Component {
    public string $content = '';
    
    #[Computed]
    public function qrCode(): string
    {
        return QrCode::size(200)->generate($this->content);
    }
}
@endphp

<div>
    <input wire:model.live.debounce.500ms="content">
    {!! $this->qrCode !!}
</div>
All articles

Keep reading

  • Authorization in Livewire v4 Components1 February 20261 min read
  • Blaze Pre-Compiler: Massive Performance Gains in Livewire v41 February 20261 min read
  • Building a Bookmark Feature with Livewire v41 February 20261 min read