@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
| Action | No | {{-- retrieve table header --}} @foreach ($table_header as $header){{ $header->alias }} | @endforeach|
|---|---|---|---|
|
@if ($detail->isactive != 'Not Active')
@endif
|
{{ method_exists($table_detail, 'firstItem') && $table_detail->firstItem() ? $table_detail->firstItem() + $loop->index : $loop->iteration }} | @foreach ($table_header as $field) @if ($field->type == 'image') @php $imageValue = $detail->{$field->field}; $isUrl = str_starts_with($imageValue, 'http://') || str_starts_with($imageValue, 'https://'); $thumbPath = 'storage/' . $imageValue . 'tumb.png'; $fullPath = 'storage/' . $imageValue; $defaultImage = asset('img/profile.png'); if ($isUrl) { $imageUrl = $imageValue; } elseif ( !empty($imageValue) && file_exists(public_path($thumbPath)) ) { $imageUrl = asset($thumbPath); } elseif ( !empty($imageValue) && file_exists(public_path($fullPath)) ) { $imageUrl = asset($fullPath); } else { $imageUrl = $defaultImage; } if ($isUrl) { $modalUrl = $imageValue; } elseif ( !empty($imageValue) && file_exists(public_path($fullPath)) ) { $modalUrl = asset($fullPath); } else { $modalUrl = $defaultImage; } @endphp
|
@else
{{ $detail->{$field->field} ?? '-' }} | @endif @endforeach