cerneigabriel/mx-sdk-laravel 问题修复 & 功能扩展

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

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

cerneigabriel/mx-sdk-laravel

最新稳定版本:v2.0.1

Composer 安装命令:

composer require cerneigabriel/mx-sdk-laravel

包简介

MultiversX SDK for Laravel (written in PHP).

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This SDK is a wrapper around the native mx-sdk-php to enable out-of-the-box support for Laravel applications.

Additionally, it comes with pre-configured MultiversX API Network Providers including caching mechanisms using the default Laravel cache driver.

Installation

You can install the package via composer:

composer require peerme/mx-sdk-laravel

And publish the config file config/multiversx.php via

php artisan vendor:publish --provider="MultiversX\ServiceProvider" --tag="config"

Usage

Since this package wraps & configures the native packages for Laravel, you can access their utitlies without further configurations.

This includes:

  • User Login Signature Verification
  • MultiversX constants
  • Domain Objects
  • Blockchain-specific constants
  • Other Utitilies & more

For more details, please refer to their documentation:

Calling the API

When instantiating the Network Providers, you can decide to optionally cache responses:

use MultiversX\Multiversx;

// retrieve fresh responses each time
$api = Multiversx::api();

// or retrieve cached responses subsequently for 1 hour
$api = Multiversx::apiWithCache(expiresAt: now()->addHour());

Validation Rules

This package exposes the following Laravel Validation Rules.

MxAddressRule – to validate a given address format:

[
    'address' => ['required', new MxAddressRule],
]

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-06