@php $columns = [ ['label' => 'Id', 'column' => 'id', 'sort' => true], ['label' => 'Title', 'column' => 'title', 'sort' => true], ['label' => 'Comment', 'column' => 'description', 'sort' => true], ['label' => 'Product', 'column' => 'product', 'sort' => false], ['label' => 'Status', 'column' => 'status', 'sort' => false], ['label' => 'Actions', 'column' => 'action', 'sort' => false], ]; @endphp @foreach ($reviews as $key => $item) {{ $item->id }} {{ $item->title }} {{ $item->description }} {{ $item->product->name }} @if ($item->status == 0) Pending @else Approved @endif @endforeach