@extends('layoutsutama.master3') @section('content')

@php $wrapText = function($text, $maxLength = 15) { $words = explode(' ', $text); $lines = []; $currentLine = ''; foreach ($words as $word) { if (strlen($currentLine . ' ' . $word) <= $maxLength) { $currentLine = trim($currentLine . ' ' . $word); } else { $lines[] = $currentLine; $currentLine = $word; } } if (!empty($currentLine)) { $lines[] = $currentLine; } return $lines; }; $text = $tickets[0]->event_name; $lines = $wrapText($text); @endphp
@foreach($lines as $line) {{ $line }}
@endforeach
{{ \Carbon\Carbon::parse($tickets[0]->date_event)->format('j F Y') }}
@php $kata = $tickets[0]->address_event; $wrapText = function($text, $maxLength = 20) { $words = explode(' ', $text); $lines1 = []; $currentLine = ''; foreach ($words as $word) { if (strlen($currentLine . ' ' . $word) <= $maxLength) { $currentLine = trim($currentLine . ' ' . $word); } else { $lines1[] = $currentLine; $currentLine = $word; } } if (!empty($currentLine)) { $lines1[] = $currentLine; } return $lines1; }; $lines1 = $wrapText($kata); @endphp
@foreach($lines1 as $line)
{{ $line }}
@endforeach

Organizer By

{{$tickets[0]->company_name}}

@foreach($priceWithParticipants as $tick)

{{ $tick->ticket_name }} ({{ $tick->category_ticket_name }})

@foreach($tick->participants as $item) @php $name = strtolower($item->participant_name); $styles = match($name) { 'open' => 'bg-green-100 text-green-700 border border-green-300', 'master' => 'bg-red-100 text-red-700 border border-red-300', 'pelajar' => 'bg-yellow-100 text-yellow-700 border border-yellow-300', default => 'bg-purple-100 text-purple-700 border border-purple-300', }; @endphp {{ $item->participant_name }} @endforeach

Rp {{ number_format($tick->price, 0, ',', '.') }}

Harga hanya untuk 1 orang

@php $now = \Carbon\Carbon::now(); $start = \Carbon\Carbon::parse($tick->start_date); $end = \Carbon\Carbon::parse($tick->end_date); @endphp @if($now->lt($start)) @elseif($now->gt($end)) @elseif($tick->peserta_count < $tick->kuota_ticket ) Registrasi @else @endif
@endforeach
@section('script') @endsection @endsection