thedevdojo / chatter

Chatter is a Simple Laravel Forum Package
https://devdojo.com/forums
MIT License
898 stars 294 forks source link

User avatar if one exists, if not use Initials #130

Open packytagliaferro opened 6 years ago

packytagliaferro commented 6 years ago

I know that I have 2 options for user image in the config file:

'avatar_image_database_field' => 'avatar',

Will show the avatar in my DB

'avatar_image_database_field' => '',

Will show the username initials and a color background.

Is there a way to defualt to the Initials if the avatar field is null? That is how my app is set up so the forum would be nice to see like that as well. Just from a UI standpoint, it would be a nice option for anyones app since as of now there is just no image if the user doesnt set one.

alizaidi606 commented 6 years ago

I may be late but as this issue was open and just started using this package and also wanted such functionality. what you need to do is override below php files into your ownresources/views