livewire real time validation code example
Example: livewire validation.mimes
@if ($photo)
@php
try {
$url = $photo->temporaryUrl();
$photoStatus = true;
}catch (RuntimeException $exception){
$this->photoStatus = false;
}
@endphp
@if($photoStatus)
<img src="{{ $url }}">
@else
Something went wrong while uploading the file.
@endif
@endif