Laravel – How to Implement Gravatar Image using thomaswelton/laravel-gravatar
In this post we will give you information about Laravel – How to Implement Gravatar Image using thomaswelton/laravel-gravatar. Hear we will give you detail about Laravel – How to Implement Gravatar Image using thomaswelton/laravel-gravatarAnd how to use it also give you demo for it if it is necessary.
Gravatar is a service that provide unique globally avatars and integrated it into their WordPress.com blogging platform. If you don’t have avatar image then you can get Gravatar src image from thier email if it register on WordPress.com. So if you want to implement in your laravel application then it is very easy. There are several package for Gravatar image for laravel, but we will use thomaswelton/laravel-gravatar package that is i think better.
First fire following command on your terminal.
Installation Package
composer require thomaswelton/laravel-gravatar
After install this package, Now open config/app.php file and add service provider and aliase.
config/app.php
'providers' => [....
ThomasweltonLaravelGravatarLaravelGravatarServiceProvider::class,
],
'aliases' => [
....
'Gravatar' => ThomasweltonLaravelGravatarFacadesGravatar::class
],
ok, now we can use Gravatar in our blade file like this way:
Use In Blade File
<img src="{{ Gravatar::src('onlinecode@gmail.com', 200) }}">
Try this it will help you and for more information click here: laravel-gravatar.
Hope this code and post will helped you for implement Laravel – How to Implement Gravatar Image using thomaswelton/laravel-gravatar. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs