Package Data | |
---|---|
Maintainer Username: | vluzrmos |
Package Create Date: | 2015-05-19 |
Package Last Update: | 2018-02-07 |
Home Page: | |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-12-14 15:05:45 |
Package Statistics | |
---|---|
Total Downloads: | 250 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 6 |
Total Watchers: | 2 |
Total Forks: | 6 |
Total Open Issues: | 0 |
That package is a easy wrapper to Badges/Poser.
#Installing
composer require vluzrmos/laravel-badge-poser
configure the aliases and providers on Laravel config/app
:
The provider:
'Vluzrmos\BadgePoser\BadgePoserSeviceProvider',
and the alias:
'Poser' => 'Vluzrmos\BadgePoser\PoserFacade',
edit the bootstrap/app.php
:
$app->register('Vluzrmos\BadgePoser\BadgePoserSeviceProvider');
//register the facade, if you need
if(!class_exists('Poser')){
class_alias('Vluzrmos\BadgePoser\PoserFacade', 'Poser');
}
Using IoC Container
class YourController extends Controller
{
public function controllerMethod(\Vluzrmos\BadgePoser\Contracts\Poser $poser)
{
return $poser->generate('slogan', 'status', 'FFFFFF', 'flat');
}
}
$response = Poser::generate('licence', 'MIT', 'FFFFF', 'plastic');
$response = Poser::generate($message, $status, $color, $format);
//where $format is 'flat' or 'plastic'
$response = Poser::generateFromURI('license-MIT-428F7E.plastic');
DBAD.