PHP code example of rackbeat / laravel-ui-avatars
1. Go to this page and download the library: Download rackbeat/laravel-ui-avatars library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rackbeat / laravel-ui-avatars example snippets
// ...
class User extends Authenticatable {
use \Rackbeat\UIAvatars\HasAvatar;
// ...
}
public function getAvatar( $size = 64 ) {
return $this->getGravatar( $this->email, $size );
}
public function getAvatarNameKey( ) {
return 'full_name';
}
bash
php artisan vendor:publish --provider="Rackbeat\UIAvatars\UIAvatarsServiceProvider"