desnake/pinata-laravel-v9 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

desnake/pinata-laravel-v9

Composer 安装命令:

composer create-project desnake/pinata-laravel-v9

包简介

The Laravel provider for Pinata API.

README 文档

README

This is a Laravel/Lumen provider for interacting with Pinata API.

Note: Special thanks to Daniel Isac (danielcrt) for providing package.

Install

Require this package with composer using the following command:

composer require desnake/pinata-laravel-v9

Installation

Add your API credentials to pinata array in the config/services.php config file as follows:

return [

    ...

    'pinata' => [

        'api_key' => env('PINATA_API_KEY'),
        'secret_key' => env('PINATA_API_SECRET')
    ]
]

Laravel

Add the service provider to the providers array in the config/app.php config file as follows:

'providers' => [

    ...

    \Pinata\Providers\PinataServiceProvider::class,
]

Lumen

Add the following snippet to the bootstrap/app.php file under the providers section as follows:

$app->configure('services');
$app->register(Pinata\Providers\PinataServiceProvider::class);

Usage

Pin a File to IPFS

  use Pinata\Facades\Pinata;

  $file_path = '';

  $response = Pinata::pinFileToIPFS($file_path);

Pin a JSON to IPFS

  use Pinata\Facades\Pinata;

  $json = [];

  $response = Pinata::pinJSONToIPFS($json);

Unpin

  use Pinata\Facades\Pinata;

  $ipfs_hash = '';

  $response = Pinata::removePinFromIPFS($ipfs_hash);

For more details about request parameters and responses please visit the official documentation: https://docs.pinata.cloud

Available methods

  • addHashToPinQueue

  • pinFileToIPFS

  • pinHashToIPFS

  • pinJobs

  • pinJSONToIPFS

  • removePinFromIPFS

  • userPinnedDataTotal

  • userPinList

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固