cachethq/badger 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

cachethq/badger

最新稳定版本:v3.0.0

Composer 安装命令:

composer require cachethq/badger

包简介

A badge generator for Laravel.

README 文档

README

An SVG badge generator for Laravel.

Installation

This version requires PHP 8.2 and Laravel 11.0 and above. For older versions of PHP or Laravel, check out the 3.x branch.

To get the latest version, simply require the project using Composer:

composer require cachethq/badger

Once installed, if you are not using automatic package discovery, then you need to register the Cachet\Badger\BadgerServiceProvider service provider in your config/app.php.

Examples

Get started immediately:

// Using the Facade
Badger::generate('license', 'MIT', 'blue', 'plastic')

// Dependency injection example
$badger->generate('license', 'MIT', '#ff69b4', 'plastic')

Usage

The generate method takes four parameters:

Badger::generate('license', 'MIT', 'blue', 'flat-square')

The first parameter is the subject, or what it is the badge is showing. In the example above this is the license. The second parameter is the value (the right hand of the badge). Next is the color of the badge. This can be one of the following preset colors or a valid hex string.

  • brightgreen
  • green
  • yellow
  • yellowgreen
  • orange
  • red
  • blue
  • grey
  • lightgray

And finally the fourth parameter is the badge type. This determines the style of the badge and can be one of the four values below.

  • flat-square (default)
  • plastic-flat, flat
  • plastic
  • social (without links)

Security

If you discover a security vulnerability within this package, please e-mail us at support@cachethq.io. All security vulnerabilities will be promptly addressed.

License

Cachet Badger is licensed under The MIT License (MIT).

Based on the work done at badges/poser.

统计信息

  • 总下载量: 40.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 21
  • Watchers: 2
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-06