thedevdojo / chatter

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

relative_url_to_image_assets and avatar_image_database_field not working #221

Open fjerbi opened 6 years ago

fjerbi commented 6 years ago

Hello I wanted to display the user photo in the chatter forums in front of every post but did not worked, the photos are located in public/img and the field name in the database is 'pic' 'relative_url_to_image_assets' => '/public/img', 'avatar_image_database_field' => 'pic', the View file :

<span class="chatter_avatar_circle" style="background-color:#<?= \DevDojo\Chatter\Helpers\ChatterHelper::stringToColorCode($discussion->user->{Config::get('chatter.user.avatar_image_database_field')}) ?>">
{{ strtoupper(substr($discussion->user->{Config::get('chatter.user.avatar_image_database_field')}, 0, 1)) }}
</span>