@php
$formatBooleanValue = fn($val) => in_array($val, ['1', 'true', true], true) ? 'Yes' : 'No';
$formatString = function ($value) {
// convert \n to
for text area, and skip html special char.
$value = nl2br(e($value));
// check for urls and embed anchor tag
if (str_starts_with($value, 'http')) {
return " $value ";
} else {
return $value;
}
};
@endphp
{{ $submission->name ?? $submission->uuid }}
{{ $submission->created_at }}
| {{ $questionTitle }} | {!! $formatBooleanValue($value) !!} |
| {{ $key }} | {!! $text !!} |
| {{ $questionTitle }} | {{ implode(', ', $value) }} |
| {{ $questionTitle }} | {!! $value !!} |