@extends('dashboard.core') @section('dashboard-body') @if($help_text != '')
{!! $help_text !!}
@endif
@foreach($columns as $column)
@php $value = $item !== null ? $item[$column['name']] : ''; $type = $id == 'new' && array_key_exists('type-new', $column) ? $column['type-new'] : $column['type']; $ext = array_key_exists('ext', $column) ? $column['ext'] : 'jpg'; @endphp @if($type == 'hidden') @elseif($type == 'user') @elseif($type != 'display' || $id != 'new')
@if($type == 'string') @elseif($type == 'text') @elseif($type == 'currency') @elseif($type == 'date' || $type == 'date-time') @elseif($type == 'mkd')
@elseif($type == 'select') @elseif($type == 'list')
@foreach($column['columns'] as $list_column)
@endforeach
@if($id != 'new') @foreach($value as $row)
@foreach($column['columns'] as $list_column)
@endforeach
@endforeach @endif
@elseif($type == 'image') @php $current_image = "/uploads/$model/img/$id-" . $column['name'] . '.' . $ext; @endphp @if(file_exists(base_path() . '/public' . $current_image))
@if(array_key_exists('delete', $column) && $column['delete']) Delete Image @endif
@endif @elseif($type == 'file') @php $current_file = "/uploads/$model/files/$id-" . $column['name'] . '.' . $column['ext']; @endphp @if(file_exists(base_path() . '/public' . $current_file))
View {{ strtoupper($column['ext']) }} @if(array_key_exists('delete', $column) && $column['delete']) Delete {{ strtoupper($column['ext']) }} @endif
@endif @elseif($type == 'display')
{{ $value }}
@endif
@endif
@endforeach
@endsection