Package Data | |
---|---|
Maintainer Username: | flaviozantut |
Maintainer Contact: | flaviozantut@gmail.com (flaviozantut) |
Package Create Date: | 2013-01-18 |
Package Last Update: | 2016-02-17 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-11 15:16:33 |
Package Statistics | |
---|---|
Total Downloads: | 92 |
Monthly Downloads: | 1 |
Daily Downloads: | 1 |
Total Stars: | 2 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Laravel 4 client to avatars.io
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
//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