@php $data = json_decode($template->body, true); if (isset($message) && $message->template_params) { $data = json_decode($message->template_params, true); } @endphp @if ($data['media']['type'] != 0 && !empty($data['media']['path']))
@if ($data['media']['type'] == '1') @elseif ($data['media']['type'] == '2') @php $mime = @mime_content_type(public_path($data['media']['path'])); @endphp @endif
@endif @if (!empty($data['title']))

{{ $data['title'] }}

@endif @if ($data['buttons']) @foreach ($data['buttons']['button_type'] as $i => $type) @if ($type == 'phone_number') {{ $data['buttons']['button_display_text'][$i] }} @elseif ($type == 'url') {{ $data['buttons']['button_display_text'][$i] }} @elseif ($type == 'quick_reply') {{ $data['buttons']['button_display_text'][$i] }} @endif @endforeach @endif