olyckne/pug
最新稳定版本:v2.0
Composer 安装命令:
composer require olyckne/pug
包简介
Get images of Pugs
README 文档
README
I LOVE PUGS!
A simple PHP wrapper around http://pugme.herokuapp.com
Usage:
composer require olyckne/pug
Standard php:
$pug = new Olyckne\Pug\Pug; $pug->random(); // returns link to an image $pug->bomb($count=5) // returns an array of links to images
Laravel:
// app/config/app.php 'providers' => [ '...', 'Olyckne\Pug\PugServiceProvider' ]; 'facades' => [ '…', 'Olyckne\Pug\PugFacade' ];
Then you can use the nice facade
Route::get('/', function () { $pug = Pug::random(); return View::make('index', compact('pug')); });
Lumen:
// boostrap/app.php // uncomment $app->withFacades(); // register the service provider and facade $app->register('Olyckne\Pug\PugServiceProvider'); class_alias('Olyckne\Pug\PugFacade', 'Pug');
统计信息
- 总下载量: 99
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-02