F
Filament2mo ago
Glebka

$record is null in table

I have created a custom table field which works almost correctly, I dont understand how it is possible to recieve $record is null error in ->avatar second closure. I am using user name first letters as a fallback if there is no avatar assigned to user
No description
No description
6 Replies
Tonkawuck
Tonkawuck2mo ago
Are you using a custom package for this avatar column? It might help to provide that information, because this isn't core Filament as far as I know.
Tonkawuck
Tonkawuck2mo ago
I will say, you can probably achieve this same effect using an ImageColumn and setting up the user avatar https://filamentphp.com/docs/3.x/panels/users#setting-up-user-avatars.
Glebka
Glebka2mo ago
I am not using custom package, but thank you, I need to create a custom solution because I use this custom column for multiple resources and a models. I just dont get it why $record suddenly became a null in this closure.
Firebat
Firebat2mo ago
I kinda got the same problem, are you using a relation manager?
Glebka
Glebka5w ago
no
Firebat
Firebat2w ago
can't you use the the "boring avatar" api? for the default value of the avatar
Want results from more Discord servers?
Add your server