@php use Hekmatinasser\Verta\Verta; use Modules\Gateway\Models\Gateway; @endphp @extends('admin.components.layouts.main') @section('page_title', 'لیست درگاه ها') @section('content')

لیست درگاه ها

@include('admin.components.datatable.table', [ 'query' => $query, 'columns' => [ [ 'label' => 'شناسه درگاه', 'field' => 'id', 'visible' => true ], [ 'label' => 'نام درگاه', 'field' => 'name', 'search' => 'text', 'visible' => true ], [ 'label' => 'تاریخ ثبت', 'field' => 'created_at', 'search' => 'date', 'render' => function($item){ return Verta::instance($item->created_at)->format('Y-m-d _ H:i:s'); }, 'visible' => true ], [ 'label' => 'تاریخ ویرایش', 'field' => 'updated_at', 'search' => 'date', 'render' => function($item){ return Verta::instance($item->updated_at)->format('Y-m-d _ H:i:s'); }, 'visible' => true ], [ 'label' => 'وضعیت', 'field' => 'is_active', 'search' => 'select', 'options' => [ Gateway::ACTIVE => 'فعال', Gateway::INACTIVE => 'غیرفعال', ], 'render' => function($item) { $status = ""; if ($item->is_active == Gateway::ACTIVE) { $status .= ''; } else { $status .= ''; } return $status . ""; }, 'visible' => true ], ], 'buttons' => [ 'render' => function($item){ return ' ویرایش جزئیات
'.csrf_field().method_field('DELETE').'
'; }, ] ])
@endsection