定制 mikielis/gravatar 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mikielis/gravatar

Composer 安装命令:

composer require mikielis/gravatar

包简介

Laravel package to retrieve gravatar url.

README 文档

README

Total Downloads Latest Stable Version

Gravatar for Laravel 5

Installation

Pull in the package through Composer:

composer require mikielis/gravatar ~1.0

Or you can add the following to your composer.json file and then run command: composer update.

"require": {
    "mikielis/gravatar": "~1.0"
}

Include the service provider withing config/app.php. That's the method for Laravel 5.4 and greater.

'providers' => [
    Mikielis\Gravatar\GravatarServiceProvider::class
];

To use the facade, add the facade alias to config/app.php:

'aliases' => [
    'Gravatar' => Mikielis\Gravatar\Facades\Gravatar::class,
];

Usage

Get gravatar URL Within your controllers or views in this way:

    Gravatar::getUrl('email@example.com');

If you want to specify a size of gravatar, do it passing second argument (integer):

    Gravatar::getUrl('email@example.com', 100);

If you want to get gravatars for more than one email address, you can do it in the following way (passing array):

    Gravatar::getUrls(['email@example.com', 'email2@example.com', 'email3@example.com']);

You can still specify your expected size in this way:

    Gravatar::getUrls(['email@example.com', 'email2@example.com', 'email3@example.com'], 60);

When preferred size is not specified, default size of gravatar is set to 80.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固