@php $columns = [['label' => 'Id', 'column' => 'id', 'sort' => true], ['label' => 'Name', 'column' => 'name', 'sort' => true], ['label' => 'From', 'column' => 'from', 'sort' => true], ['label' => 'To', 'column' => 'to', 'sort' => true], ['label' => 'Actions', 'column' => 'action', 'sort' => false]]; @endphp @foreach ($coupons as $key => $item) {{ $item->id }} {{ $item->name }} {{ (new DateTime($item->from))->format('d-m-Y') }} {{ (new DateTime($item->to))->format('d-m-Y') }} @endforeach