khaled-sadek/blade-boring-avatars
Composer 安装命令:
composer require khaled-sadek/blade-boring-avatars
包简介
Blade components to auto generate boring avatars based on name
README 文档
README
A Blade version of Boring Avatars. Built using Laravel Blade.
Based on Boring Avatar's description,
Boring Avatars a tiny JavaScript React library that generates custom, SVG-based, round avatars from any username and color palette.
This package provides a Blade component you can use directly in your Laravel projects.
Features
- Similar API with the React version of Boring Avatars.
Installation
composer require khaled-sadek/blade-boring-avatars
Compatibility
- PHP: 8.2 or higher
- Laravel: 10.x, 11.x, 12.x
Note for Laravel 9.x and below users: If you're using Laravel 9.x or below, please use version 1.x of this package which supports PHP 8.1 and Laravel 7-9.
Publishing to Packagist
This package is set up to automatically publish to Packagist when a new Git tag is pushed. To enable this:
- Go to your Packagist account and get an API token from your tokens page.
- In your GitHub repository, go to Settings > Secrets and variables > Actions
- Add the following repository secrets:
PACKAGIST_TOKEN: Your Packagist API tokenPACKAGIST_USERNAME: Your Packagist username
After setting up these secrets, pushing a new tag prefixed with v (for example, v2.0.0) will automatically trigger a new release on Packagist.
This package auto-discovers its service provider, so no manual registration is required.
Props
Props:
size: number- Default:
40
- Default:
name: string- Default:
"Clara Barton"
- Default:
colors: array[]- Accepts a php array of colors.
- Default:
["#92A1C6", "#146A7C", "#F0AB3D", "#C271B4", "#C20D90"]
Usage
Basic usage (with default props):
<x-avatar />
With props:
<!-- view.blade.php where $colors is a valid PHP array --> <x-avatar size="80" name="Khaled Sadek" :colors="$colors" />
Backward compatibility: the PascalCase tag <x-Avatar /> remains available.
Credits
Credits to @hihayk (GitHub) and @josep_martins (GitHub) for creating the original Boring Avatars library at boringdesigners!
khaled-sadek/blade-boring-avatars 适用场景与选型建议
khaled-sadek/blade-boring-avatars 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 222 次下载、GitHub Stars 达 10, 最近一次更新时间为 2021 年 06 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「ui」 「laravel」 「blade」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 khaled-sadek/blade-boring-avatars 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 khaled-sadek/blade-boring-avatars 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 khaled-sadek/blade-boring-avatars 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Alfabank REST API integration
Render blade templates into a PSR-7 Response object.
A tiny Flask-like PHP microframework where each public method is an endpoint and routes are inferred from method names.
The EdgestashBlade Laravel package adds Edgestash support to Blade. Edgestash is a Varnish Enterprise module that processes Mustache templates on the edge.
Laravel package for Accurate Online API integration.
Shared RCX Laravel DataTables UI and configuration helpers.
统计信息
- 总下载量: 222
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-06-02