Комментарии:
This is very helpful. I have been generating these avatars on the fly with this package as a user trait. Seems like it would be much smarter to store them.
Ответитьgreat tip, thank you🥰
ОтветитьHello. Could you please make a video about laravel precognition?
ОтветитьHey Man, I want to know something about the multiple insertion. On a form submit, if user click couple of time on the submit button it will insert the same form data multiple times. We can project that by using JS on the button but what we I can do on MySQL end? I hope you got my problem. Let me know if you need more explanation.
ОтветитьIf you don't need extra shapes and colors, this is a couple of lines of PHP to generate initial based avatars. I use it on one of my client projects, mind you I only use first letter of the name but it isn't a lot harder to get two (it gets a bit tricky with people with last names that are two or more words separated by spaces of course). {{substr($thread->user->name,0,1)}}
ОтветитьI prefer Gravatar.
ОтветитьSir Your Work is awesome But One Problem in your video cannot under stand code perfectly.
ОтветитьFor anyone considering @Mel's way:
Create a component, say: UserAvatar.vue
<div class="rounded-full m-1 h-16 w-16 relative justify-center uppercase bg-gray-200 flex items-center text-2xl font-semibold" v-text="name.split(' ').slice(0, 2).join(' ').split(' ').map((n) => n[0]).join('')" />
<script setup>
let props = defineProps({
name: String
})
</script>
You can pass more customizations as props I guess: bg-color, font size, avatar size
*Inline styles are from tailwind
I enjoy your daily videos...thank you. Regarding avatars, why bother with these dependencies? It's so easy to create avatars with just a little CSS that it doesn't seem worth it to me to add extra dependencies to a project. I used to use Laravolt and removed it two years ago...no need, in my view. I won't comment about external services. That's just not a great idea for this purpose.
ОтветитьI was wondering if you plan to release a course for laravel docker integration, from scratch and also with Sail? And also, do you plan to cover microservices in your future courses? Ps. Love your work, you have influenced me and my dev career like no other.
Ответитьi display a default blank avatar image when there is a newly created user w/o avatar.
ОтветитьSecond one is good.
Thank you. 👍
Me being the crazy individual I am
You can either upload a profile picture
Or upload one to gravatar or
Initials
I'll go with the second one.
ОтветитьI'd prefer the second one. But if there was no options available, I'd go for the exact same way @Mel mentioned.
ОтветитьI prefer trimming the name and get the initials using javascript then lay it out in a circle div could be much lighter. But nice to know these packages! As always, awesome work!
ОтветитьNice
ОтветитьCheguei primeiro. 😉
Ответить