flaviozantut / avatars
avatars.io client
v1.0.0
2013-07-17 22:39 UTC
Requires
- php: >=5.3.0
- guzzle/guzzle: 3.7.*
- illuminate/support: 4.0.x
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-12-18 11:21:11 UTC
README
Laravel 4 client to avatars.io
Installation
Installation with php composer
composer require "flaviozantut/avatars:1.0.*"
add to app.php 'providers':
'Flaviozantut\Avatars\AvatarsServiceProvider',
add to app.php 'aliases':
'Avatars' => 'Flaviozantut\Avatars\AvatarsFacade',
Register on avatars.io and after receiving the email with the configuration switches run the commands substituting the keys
php artisan avatars:client_id YOURCLIENTID
php artisan avatars:secret_key YOURSECRETKEY
php artisan config:publish flaviozantut/avatars
Usage
//get avatar url
$app['avatars']->url('user@mail.com', 'auto');
//upload avatar
$app['avatars']->upload(base64encodefile, userid);
//get by URL
http://yourapp.dev/avatars/userid/service/size
//POST photo to
http://yourapp.dev/avatars/userid