芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/app/DataTables/Admin/PagesDataTable.php
query(); return datatables() ->of($page) ->addColumn('action', function ($page) { $edit = $delete = ''; $edit = (Common::has_permission(auth('admin')->user()->id, 'edit_page')) ? '
' : ''; $delete = (Common::has_permission(auth('admin')->user()->id, 'delete_page')) ? '
' : ''; return $edit . $delete; }) ->addColumn('name', function ($page) { return '
' . $page->name . '
'; }) ->addColumn('url', function ($page) { return '
' . $page->url . '
'; }) ->addColumn('position', function ($page) { return $page->position; }) ->editColumn('status', function ($page) { return ucfirst($page->status); }) ->rawColumns(['url', 'name', 'action']) ->make(true); } public function query() { $page = Pages::select(); return $this->applyScopes($page); } public function html() { return $this->builder() ->addColumn(['data' => 'id', 'name' => 'pages.id', 'title' => __('ID'), 'searchable' => false, 'visible' => false]) ->addColumn(['data' => 'name', 'name' => 'pages.name', 'title' => __('Name')]) ->addColumn(['data' => 'url', 'name' => 'pages.url', 'title' => __('Url')]) ->addColumn(['data' => 'position', 'name' => 'pages.position', 'title' => __('Position')]) ->addColumn(['data' => 'status', 'name' => 'pages.status', 'title' => __('Status')]) ->addColumn(['data' => 'action', 'name' => 'action', 'title' => __('Action'), 'orderable' => false, 'searchable' => false]) ->parameters(dataTableOptions()); } }