-
composer.json
Open in GitHub{ "require": { "php": "^8.0", // "laravolt/avatar": "^4.1", } }
-
app/Models/User.php
Open in GitHubuse Illuminate\Foundation\Auth\User as Authenticatable; use Laravolt\Avatar\Facade as Avatar; class User extends Authenticatable { public function getAvatarAttribute() { // return Avatar::create(Str::title($this->email))->toBase64(); } }