sdpgs/gyazo-laravel

sdpgs/gyazo-laravel derives from sdpgs/gyazo, optimized to Laravel app

1.0.0 2023-01-19 14:13 UTC

This package is auto-updated.

Last update: 2025-05-29 01:54:54 UTC


README

MIT License tests MIT PHPStan

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