We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6e0998 commit 48c5f68Copy full SHA for 48c5f68
src/Resources/ActivitylogResource.php
@@ -224,11 +224,12 @@ public static function getCauserNameColumnComponent(): Column
224
return TextColumn::make('causer.name')
225
->label(__('activitylog::tables.columns.causer.label'))
226
->getStateUsing(function (Model $record) {
227
-
228
- if ($record->causer_id == null) {
+ // Check if causer is null or causer_id is null
+ if ($record->causer_id == null || $record->causer == null) {
229
return new HtmlString('—');
230
}
231
232
+ // Return the causer's name if causer exists
233
return $record->causer->name;
234
})
235
->searchable();
0 commit comments