React Nice Avatar Support in Laravel 🥳 #58
alissaestelle
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Good to see that 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
RNA is better than most other avatar plugins by a long shot, so I really wanted to use this package in my Laravel blog project. After some initial configuration, I was able to render avatars for each fake user in the blog comments section. My only problem was that I was rendering the same avatar for every user 😅 Luckily I was able to get that sorted after reworking the logic in my mapping function.
Anyways, here's a little demo!
RNA3.mov
I'm refreshing the page offscreen in the video so you can see that random avatars are generated on page load (I'm not currently saving avatars to specific users in my database, but that's in the works).
I did notice though that randomly-generated avatars excluded the pretty gradient backgrounds 💔 so I created a special gradients array and wrote logic to either set the background color as a randomly selected gradient or stick with the original color provided (that way backgrounds aren't all one or the other). Anyways ... voilà 😛
Beta Was this translation helpful? Give feedback.
All reactions