| @@ 38-46 (lines=9) @@ | ||
| 35 | * |
|
| 36 | * @return \Illuminate\Http\JsonResponse |
|
| 37 | */ |
|
| 38 | public function ajax() |
|
| 39 | { |
|
| 40 | return $this->datatables |
|
| 41 | ->eloquent($this->query()) |
|
| 42 | ->orderColumn('name', '-name $1') |
|
| 43 | ->editColumn('device_id', 'datatables.syslog.hostname') |
|
| 44 | ->rawColumns(['device_id']) |
|
| 45 | ->make(true); |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * Get the query object to be processed by datatables. |
|
| @@ 38-48 (lines=11) @@ | ||
| 35 | * |
|
| 36 | * @return \Illuminate\Http\JsonResponse |
|
| 37 | */ |
|
| 38 | public function ajax() |
|
| 39 | { |
|
| 40 | return $this->datatables |
|
| 41 | ->eloquent($this->query()) |
|
| 42 | ->editColumn('level', function ($user) { |
|
| 43 | return trans('user.level.'.$user->level); |
|
| 44 | }) |
|
| 45 | ->editColumn('actions', 'datatables.user.actions') |
|
| 46 | ->rawColumns(['actions']) |
|
| 47 | ->make(true); |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Get the query object to be processed by datatables. |
|