@php
/** @var \App\Admin\Column $column */
$text = $column->text($record);
$href = null;
if ($column->link) {
$href = route($resource::routeName('show'), $record);
} elseif ($column->linkResource && ($linkedId = $column->linkedId($record)) && \Illuminate\Support\Facades\Route::has('admin.'.$column->linkResource.'.show')) {
$href = route('admin.'.$column->linkResource.'.show', $linkedId);
}
@endphp
@if($column->format === 'badge' && $text !== '—')
{{ $text }}
@elseif($column->format === 'boolean' && $text !== '—')
{{ $text }}
@elseif($href && $text !== '—')
@if($column->link){{ $text }}@else{{ $text }}@endif
@else
{{ $text }}
@endif