-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
todo #42
Comments
Can I tackle items number 2 and 3? |
Of course, you can send a PR with a solution 👍 |
As a todo, what do you think about displaying some property from subject instead of the ID for logged objects? modified header.blade.php at line 80: <span>#{{ $logger->getSubjectLabel($activity->subject) ?? $activity->subject_id }}</span> modified UserLogger class: ...
class UserLogger extends Logger
{
public static ?string $model = User::class;
public static function getLabel(): string | Htmlable | null
{
return UserResource::getModelLabel();
}
public static function getSubjectLabel($subject): string | Htmlable | null
{
return $subject?->name;
}
...
} I'm not sure if it's the best way of doing this, but it works for me. If you have time, please |
@borex , thanks for your attention to the plugin 🙏 However, to adapt this solution for your needs, you can override/create the |
@noxoua Thanks for your reply. I agree with what you are saying regarding other users, but the only thing that I don't like in my solution is overriding the header.blade.php file. In case this file gets modified in a newer version of the plugin I will need to keep track of it and reaply my changes again. If you would put the subject ID in a method that can be configured or overwritten then it would be much better to have the user display whatever value they want. Do you think that this could be a solution for this problem? |
@borex I rethought this and realized that you are right. Unfortunately, I don’t have enough time right now to implement this functionality. I’ll add it as soon as I can. or you can send PR. I think it's best to add a function to the logger class that all loggers extend. |
@noxoua Sorry, but I didn't had time to work on this. I have just checked out the new changes and it is very nice. Thank you for implementing it. |
@noxoua what about Encrypted values? Can you parse the casts? |
Associate
,Dissociate
, +BulkAttach
,Detach
, +BulkgetFilamentAvatarUrl
optionalThe text was updated successfully, but these errors were encountered: