芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/app/DataTables/Admin/LanguagesDataTable.php
query(); return datatables() ->of($language) ->addColumn('action', function ($language) { $edit = $delete = ''; $edit = (Common::has_permission(auth('admin')->user()->id, 'edit_language')) ? '
' : ''; if ($language->deletable == 'No') { $delete = ''; } else { $delete = (Common::has_permission(auth('admin')->user()->id, 'delete_language')) ? '
' : ''; } return $edit . $delete; }) ->editColumn('status', function ($language) { return getStatusLabel($language->status); }) ->editColumn('flag', function ($language) { return '
'; }) ->rawColumns(['flag', 'status', 'action']) ->make(true); } /** * Get the query object to be processed by dataTables. * * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Support\Collection */ public function query() { $language = Language::select(); return $this->applyScopes($language); } /** * Optional method if you want to use html builder. * * @return \Yajra\Datatables\Html\Builder */ public function html() { return $this->builder() ->addColumn(['data' => 'id', 'name' => 'languages.id', 'title' => __('ID'), 'searchable' => false, 'visible' => false]) ->addColumn(['data' => 'name', 'name' => 'languages.name', 'title' => __('Name')]) ->addColumn(['data' => 'short_name', 'name' => 'languages.short_name', 'title' => __('Short Name')]) ->addColumn(['data' => 'flag', 'name' => 'languages.flag', 'title' => __('Flag')]) ->addColumn(['data' => 'status', 'name' => 'languages.status', 'title' => __('Status')]) ->addColumn(['data' => 'action', 'name' => 'action', 'title' => __('Action'), 'orderable' => false, 'searchable' => false]) ->parameters(dataTableOptions()); } }