@@ 20-26 (lines=7) @@ | ||
17 | public function dataTable($query) |
|
18 | { |
|
19 | return datatables($query) |
|
20 | ->editColumn('causer_id', function ($activity) { |
|
21 | if ($activity->causer_id && is_object($activity->causer)) { |
|
22 | return '<a href="' . route($this->getRouteFromType($activity->causer_type), $activity->causer_id) . '">' . $activity->causer->name ?? '' . '</a>'; |
|
23 | } else { |
|
24 | return ''; |
|
25 | } |
|
26 | }) |
|
27 | ->editColumn('subject_id', function ($activity) { |
|
28 | if ($activity->subject_id && is_object($activity->subject)) { |
|
29 | return '<a href="' . route($this->getRouteFromType($activity->subject_type), $activity->subject_id) . '">' . $activity->subject->name ?? '' . '</a>'; |
|
@@ 27-33 (lines=7) @@ | ||
24 | return ''; |
|
25 | } |
|
26 | }) |
|
27 | ->editColumn('subject_id', function ($activity) { |
|
28 | if ($activity->subject_id && is_object($activity->subject)) { |
|
29 | return '<a href="' . route($this->getRouteFromType($activity->subject_type), $activity->subject_id) . '">' . $activity->subject->name ?? '' . '</a>'; |
|
30 | } else { |
|
31 | return ''; |
|
32 | } |
|
33 | }) |
|
34 | ->editColumn('properties', function ($activity) { |
|
35 | return $activity->properties; |
|
36 | }) |