Replies: 2 comments 1 reply
-
This is related #56 |
Beta Was this translation helpful? Give feedback.
0 replies
-
implemented in #101 Here is an example of how this feature will be used LoggerPlugin::make()
->resolveSubjectNameUsing(function (Activity $record, ?string $state) {
if (is_null($state)) { // No Subject
return '-';
}
return match ($state) {
Post::class => $record->subject->title,
User::class => $record->subject->name,
default => Str::of($state)->afterLast('\\')->headline().' # '.$record->subject_id,
};
}), |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
Thanks for the nice package.
I need a way to customize how the subject title is retrieved. Currently this is the hard-coded implementation:
Currently if you want to override this you will have to copy/paste more than 100 lines of code (the whole
table
method) to change this hard-coded implementation.I wanted to submit a PR and extract a method which we can override, but I thought I would run the idea by you first, and then do the PR if you're willing to merge.
Beta Was this translation helpful? Give feedback.
All reactions