@php use App\Models\Badge; @endphp @switch($key) @case(is_array($value)) @json($value) @break @case('image') @break @case('badge_id') @php $badge = Badge::find($value); @endphp {{$badge->name}} @break @case(in_array($key , ['time_from','time_to'])) {{\Carbon\Carbon::parse($value)->format('H:i')}} @break @default {{$value}} @endswitch