-
composer.json
Open in GitHub{ "require": { "php": "^8.0", "codeitnowin/barcode": "^3.0", "creativeorange/gravatar": "~1.0", // } }
-
app/Models/User.php
Open in GitHubuse Creativeorange\Gravatar\Facades\Gravatar; use Illuminate\Foundation\Auth\User as Authenticatable; class User extends Authenticatable { public function getAvatarAttribute() { if (Gravatar::exists($this->email) == true) { return Gravatar::get($this->email); } } }