PHP code example of wuqb / laravel-avatar

1. Go to this page and download the library: Download wuqb/laravel-avatar 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/ */

    

wuqb / laravel-avatar example snippets


Wqb\Avatar\AvatarProvider::class,

'Avatar' => Wqb\Avatar\Facades\Avatar::class

// 第一个参数姓名,第二个参数图片生成位置
Avatar::output('吴','wu.png')
bash
php artisan vendor:publish

php artisan serve --port=8080
Route::get('/avatar-bao', function () {
    Avatar::output('宝','bao.png');
});