/home/techb158/immovalet.com/platform/plugins/audit-log/src/Tables
NameSizeModeActions
AuditLogTable.php30890644editdlrm
Edit: /home/techb158/immovalet.com/platform/plugins/audit-log/src/Tables/AuditLogTable.php (3089B)
repository = $auditLogRepository; if (!Auth::user()->hasPermission('audit-log.destroy')) { $this->hasOperations = false; $this->hasActions = false; } } /** * {@inheritDoc} */ public function ajax() { $data = $this->table ->eloquent($this->query()) ->editColumn('checkbox', function ($item) { return $this->getCheckbox($item->id); }) ->editColumn('action', function ($history) { return view('plugins/audit-log::activity-line', compact('history'))->render(); }) ->addColumn('operations', function ($item) { return $this->getOperations(null, 'audit-log.destroy', $item); }); return $this->toJson($data); } /** * {@inheritDoc} */ public function query() { $query = $this->repository->getModel() ->with(['user']) ->select(['*']); return $this->applyScopes($query); } /** * {@inheritDoc} */ public function columns() { return [ 'id' => [ 'name' => 'id', 'title' => trans('core/base::tables.id'), 'width' => '20px', ], 'action' => [ 'name' => 'action', 'title' => trans('plugins/audit-log::history.action'), 'class' => 'text-left', ], 'user_agent' => [ 'name' => 'user_agent', 'title' => trans('plugins/audit-log::history.user_agent'), 'class' => 'text-left', ], ]; } /** * {@inheritDoc} */ public function buttons() { return [ 'empty' => [ 'link' => route('audit-log.empty'), 'text' => Html::tag('i', '', ['class' => 'fa fa-trash'])->toHtml() . ' ' . trans('plugins/audit-log::history.delete_all'), ], ]; } /** * {@inheritDoc} */ public function bulkActions(): array { return $this->addDeleteAction(route('audit-log.deletes'), 'audit-log.destroy', parent::bulkActions()); } }