@php $messages = array( array( 'user' => 4, 'type' => 'in', 'text' => 'How likely are you to recommend our company to your friends and family ?', 'time' => '2 mins' ), array( 'user' => 2, 'type' => 'out', 'text' => 'Hey there, we’re just writing to let you know that you’ve been subscribed to a repository on GitHub.', 'time' => '5 mins' ), array( 'user' => 4, 'type' => 'in', 'text' => 'Ok, Understood!', 'time' => '1 Hour' ), array( 'user' => 2, 'type' => 'out', 'text' => 'You’ll receive notifications for all issues, pull requests!', 'time' => '2 Hours' ), array( 'user' => 4, 'type' => 'in', 'text' => 'You can unwatch this repository immediately by clicking here: Keenthemes.com', 'time' => '3 Hours' ), array( 'user' => 2, 'type' => 'out', 'text' => 'Most purchased Business courses during this sale!', 'time' => '4 Hours' ), array( 'user' => 4, 'type' => 'in', 'text' => 'Company BBQ to celebrate the last quater achievements and goals. Food and drinks provided', 'time' => '5 Hours' ), array( 'template' => true, 'user' => 2, 'type' => 'out', 'text' => '', 'time' => 'Just now' ), array( 'template' => true, 'user' => 4, 'type' => 'in', 'text' => 'Right before vacation season we have the next Big Deal for you.', 'time' => 'Just now' ) ) @endphp @foreach($messages as $message) @php $user = \App\Core\Data::getSampleUserInfo($message['user']); $user['size'] = '35px'; $state = $message['type'] === 'in' ? 'info' : 'primary'; $comment = (isset($message['template']) ? 'template for ' : '') . $message['type']; $template_attr = (isset($message['template']) ? 'data-kt-element="template-' . $message['type'] . '"' : ''); @endphp
@if($message['type'] === 'in') {!! \App\Core\Components::getAvatar($user) !!}
{{ $user['name'] }} {{ $message['time'] }}
@else
{{ $message['time'] }} You
{!! \App\Core\Components::getAvatar($user) !!} @endif
{{ $message['text'] }}
@endforeach