@php
// Decode relations if it's a JSON string
$relations = $charkilla->relations;
if (is_string($relations)) {
$relations = json_decode($relations, true);
}
// If no relations or empty, create a default empty array
if (empty($relations)) {
$relations = [['plot_no' => '', 'area' => '', 'east' => '', 'west' => '', 'north' => '', 'south' => '']];
}
@endphp
@foreach($relations as $index => $relation)
@endforeach