@php
$base64Image = base64_encode(file_get_contents(public_path($model->image)));
@endphp
@foreach ($users as $index => $user)
@if ($index % 4 == 0)
@endif
@php
$name = $user->my_full_name;
$course = $course;
$company = $user->company->name ?? '-';
$sourceCode = $model->code;
$position=$user->function??'';
$function = $user instanceof App\Coach ? 'مدرب' : 'متدرب';
$sourceCode = str_replace(['{name}', '{course}', '{company}','{position}','{function}'],
[$name, $course, $company,$position,$function], $sourceCode);
@endphp
{!! $sourceCode !!}
@if (($index + 1) % 4 == 0)
@if ($index < count($users) - 1)