@php
$messages = [
['sender' => 'other', 'content' => 'Hi there! I just released a new song and wanted to get your feedback.', 'time' => '10:05 AM'],
['sender' => 'me', 'content' => 'Hey John! That sounds great. What genre is it?', 'time' => '10:07 AM'],
['sender' => 'other', 'content' => 'It\'s a mix of pop and electronic. I\'ve been experimenting with some new sounds.', 'time' => '10:09 AM'],
['sender' => 'me', 'content' => 'Awesome! I\'d love to hear it. Can you share a preview?', 'time' => '10:12 AM'],
['sender' => 'other', 'content' => 'Sure! Here\'s a link to the preview:', 'time' => '10:15 AM'],
['sender' => 'other', 'content' => 'https://example.com/song-preview', 'time' => '10:15 AM', 'has_attachment' => true, 'attachment_type' => 'audio'],
['sender' => 'me', 'content' => 'This sounds amazing! The production quality is top-notch. I especially like the bridge section.', 'time' => '10:20 AM'],
['sender' => 'other', 'content' => 'Thanks! I spent a lot of time on that part. Do you think it\'s ready for release?', 'time' => '10:22 AM'],
['sender' => 'me', 'content' => 'Absolutely! Your fans will love it. When are you planning to release it?', 'time' => '10:25 AM'],
['sender' => 'other', 'content' => 'I\'m thinking next Friday. I\'ll be promoting it on social media starting tomorrow.', 'time' => '10:28 AM'],
];
foreach ($messages as $message) {
$isMe = $message['sender'] === 'me';
$hasAttachment = isset($message['has_attachment']) && $message['has_attachment'];
@endphp
@if(!$isMe)
@endif
{{ $message['content'] }}
@if($hasAttachment)
@if($message['attachment_type'] === 'audio')
New Song Preview.mp3
3:45 • 4.2 MB
@endif
@endif
{{ $message['time'] }}
@if($isMe)
@endif
@php
}
@endphp