alt-three / badger
A Badge Generator For Laravel 5
Installs: 159 574
Dependents: 0
Suggesters: 0
Security: 0
Stars: 51
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: ^7.1.3
- illuminate/contracts: 5.5.*|5.6.*|5.7.*
- illuminate/support: 5.5.*|5.6.*|5.7.*
Requires (Dev)
- graham-campbell/analyzer: ^2.1
- graham-campbell/testbench: ^5.1
- phpunit/phpunit: ^6.5|^7.0
README
A badge generator for Laravel 5.
Installation
This version requires PHP 7.1 or 7.2, and supports Laravel 5.5 - 5.7 only.
To get the latest version, simply require the project using Composer:
$ composer require alt-three/badger
Once installed, if you are not using automatic package discovery, then you need to register the AltThree\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@alt-three.com. All security vulnerabilities will be promptly addressed.
License
Alt Three Badger is licensed under The MIT License (MIT).
Based on the work done at badges/poser.