From 575d3675cf2b81922473b8f1be125aede0111c2e Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 25 May 2026 15:55:45 +0530 Subject: [PATCH] Added logic to show captured image --- resources/views/livewire/webcam.blade.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/views/livewire/webcam.blade.php b/resources/views/livewire/webcam.blade.php index cd71ebf..1d5407b 100644 --- a/resources/views/livewire/webcam.blade.php +++ b/resources/views/livewire/webcam.blade.php @@ -3,6 +3,7 @@ cameraActive: false, captured: false, errorMessage: '', + photoData: '', async startCamera() { this.errorMessage = ''; @@ -38,6 +39,7 @@ } this.cameraActive = false; this.captured = true; + this.photoData = photoData; // Send photo data to PHP via Livewire $wire.setPhoto(photoData); @@ -45,6 +47,7 @@ retake() { this.captured = false; + this.photoData = ''; $wire.clearPhoto(); this.$nextTick(() => this.startCamera()); } @@ -84,7 +87,8 @@ {{-- ── Captured photo preview (shown after capture) ── --}}