fix(datatable): error relation
This commit is contained in:
parent
64c53b0314
commit
d9d20abd37
@ -1751,13 +1751,13 @@ public function mediaProposal(Request $request)
|
||||
return DataTables::of($data)
|
||||
->addIndexColumn()
|
||||
->addColumn('name', function ($data) {
|
||||
return '<div style="width: 100%;word-wrap: break-word; white-space: normal;">'.$data->cooperation->name.'</div>';
|
||||
return '<div style="width: 100%;word-wrap: break-word; white-space: normal;">'.$data?->cooperation?->name.'</div>';
|
||||
})
|
||||
->addColumn('start_date', function ($data) {
|
||||
return idn_date($data->cooperation->start_date, 'l, d F Y');
|
||||
return idn_date($data?->cooperation?->start_date, 'l, d F Y');
|
||||
})
|
||||
->addColumn('end_date', function ($data) {
|
||||
return idn_date($data->cooperation->end_date, 'l, d F Y');
|
||||
return idn_date($data?->cooperation?->end_date, 'l, d F Y');
|
||||
})
|
||||
->addColumn('send_proposal_at', function ($data) {
|
||||
return idn_date($data->created_at, 'l, d F Y');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user