tomshaw/laravel-gravatar
最新稳定版本:v0.2.0
Composer 安装命令:
composer require tomshaw/laravel-gravatar
包简介
A zero config named parameter Laravel Gravatar Directive.
关键字:
README 文档
README
A zero config named parameter Laravel Gravatar Directive.
Installation
You can install the package via composer:
composer require tomshaw/laravel-gravatar
Usage
Configure the Gravatar Image where you plan on utilizing it.
<img src="@gravatar(email: 'email@example.com', size: 60, default: 'retro', rating: 'g')" />
This generates an
60pixelsretrostyle image with agrating.
Parameters
The default parameters are described below:
-
$email(string): The email address of the user. This is required. -
$size(int): The size of the Gravatar image in pixels. Default is60. Must be between1and2048. -
$default(string): The default image to display if the user doesn't have a Gravatar. Default is'mp'. Options include:'mp','identicon','monsterid','wavatar','retro','robohash','blank'. -
$rating(string): The rating of the Gravatar image. Default is'g'. Options include:'g','pg','r','x'. -
$secure(bool): Whether to use the secure Gravatar URL. Default istrue. -
$forceDefault(string): Whether to always load the default image. Default is'n'. -
$forceExtension(string): The file extension for the Gravatar image. Default is'jpg'.
Requirements
The package is compatible with PHP 8 or later.
License
The MIT License (MIT). See License File for more information.
统计信息
- 总下载量: 4.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-14