fix(datatable): error when nullable relation
This commit is contained in:
parent
2268197bb6
commit
c703453a78
@ -3223,7 +3223,7 @@ public function logActivity(Request $request){
|
|||||||
return DataTables::of($data)
|
return DataTables::of($data)
|
||||||
->addIndexColumn()
|
->addIndexColumn()
|
||||||
->addColumn('causer', function ($data) {
|
->addColumn('causer', function ($data) {
|
||||||
return $data->causer->name;
|
return $data?->causer?->name;
|
||||||
})
|
})
|
||||||
->addColumn('action_type', function ($data) {
|
->addColumn('action_type', function ($data) {
|
||||||
switch($data->event){
|
switch($data->event){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user