gyazo-laravel maintained by sdpgs
Description
sdpgs/gyazo-laravel derives from sdpgs/gyazo, optimized to Laravel app
Author
Last update
2023/01/21 06:40
(dev-master)
License
Downloads
9
sdpgs-gyazo-laravel
Introduction
see sdpgs-gyazo
Get Started
Requires PHP 8.1+
First you have to do is to composer require:
composer require sdpgs/gyazo-laravel
Next, publish the config file into your Laravel configs:
php artisan vendor:publish --tag=sdpgs-gyazo-config
And you can see created config/gyazo.php file in your Laravel project.
Then, you have to add Gyazo access token to .env file as below.
GYAZO_ACCESS_TOKEN=sd...
If you don't get Gyazo access token yet, go Gyazo API dashboard and generate yours.
Finally, you may get available to use Gyazo facade.
use Sdpgs\GyazoLaravel\Facades\Gyazo;
$response = Gyazo::uploadImage(
imageData: '{image binary as string}',
fileName: 'some_file.png',
options: []
);
dd($response);
Official Documentation
Documentation for Gyazo API can be found on Gyazo API