@extends(config('template.layout')) @section('content')

Detail Data {{ $title }}

{{ $title }}
@foreach ($columns as $column => $label) @if (is_array($label)) @if ($label['type'] == 'image')
{{ $label['name'] }}
@if ($data->$column != null && file_exists(public_path($data->$column))) {{ $label['name'] }} @else File tidak tersedia @endif
@elseif ($label['type'] == 'file')
{{ $label['name'] }}
@if ($data->$column != null && file_exists(public_path($data->$column))) @php $filePath = public_path($data->$column); $extension = \Illuminate\Support\Str::lower(pathinfo($filePath, PATHINFO_EXTENSION)); @endphp @if ($extension === 'pdf') @elseif ($extension === 'docx' || $extension === 'doc') @endif @else File Tidak Tersedia @endif
@else
{{ $label['name'] }}
{!! $data->$column !!}
@endif @else
{{ $label }}
{!! $data->$column !!}
@endif @endforeach
@endsection