laravel-like-comment icon indicating copy to clipboard operation
laravel-like-comment copied to clipboard

problem with avatar in the comment

Open BBEDERRAR opened this issue 7 years ago • 0 comments

how to show the avatar of user in the comments . i changed in the function getAuthor but the avatar not shown in the comment public static function getAuthor($id) { $user = self::find($id); $info=[ 'id' => $user->id, 'name' => $user->name, 'email' => $user->email, 'url' => '', // Optional 'avatar' => 'gravatar', // Default avatar 'admin' => $user->role === 'admin', // bool ];

    if ($user->facebook_id)
    {
        $info['avatar']=$user->avatar;
    }else{
        $info['avatar']=asset('avatar/'.$user->avatar);
    }

    return $info;

}

BBEDERRAR avatar Aug 01 '17 10:08 BBEDERRAR