kadena-php/laravel
Composer 安装命令:
composer require kadena-php/laravel
包简介
Laravel Client for use with the Kadena Pact API
README 文档
README
This package includes a simple-to-use client to communicate with the Pact API.
Note: This repository only contains the integration code of the Kadena PHP client for Laravel. If you want to use the Kadena PHP client in a framework-agnostic way, take a look at the kadena-php/client repository.
Installation
Via Composer
composer require kadena-php/laravel
You can configure the Kadena API base URL by configuring your env:
KADENA_API_BASE_URL=http://localhost:8000
Optionally, you can also publish the config file:
php artisan vendor:publish --tag=kadena-config
Usage
For usage examples, see the kadena-php/client repository before starting to use the Laravel integration.
This package contains three convenience Facades. Their usage are largely similar to the classes documented in the client package:
Client Facade
Kadena\Laravel\Facades\Client
Usage
$response = Client::local($signedCommand);
Command Facade
Kadena\Laravel\Facades\Command
Usage
$command = Command::withExecutePayload($payload) ->withMetadata($metadata) ->make();
To see all options, see the Command Factory documentation in the client repository.
Metadata Facade
Kadena\Laravel\Facades\Metadata
Usage
$metadata = Metadata::make();
To see all options, see the Metadata Factory documentation in the client repository.
When not specifying any options like the example above, the options set in the kadena.php config will be used.
Config
An example of the default config:
return [ 'api' => [ 'base_url' => env('KADENA_API_BASE_URL', 'http://localhost:8888'), ], 'meta' => [ 'ttl' => 7200, 'gasLimit' => 10000, 'chainId' => '0', 'gasPrice' => 1e-8, 'sender' => '' ], ];
Change log
Please see the changelog for more information on what has changed recently.
Testing
./vendor/bin/phpunit
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security-related issues, please send an email instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
kadena-php/laravel 适用场景与选型建议
kadena-php/laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 2, 最近一次更新时间为 2023 年 01 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「Kadena」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kadena-php/laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kadena-php/laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kadena-php/laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Alfabank REST API integration
PHP Client for use with the Kadena Pact API
Laravel package for Accurate Online API integration.
Shared RCX Laravel DataTables UI and configuration helpers.
Boot a Laravel project on any machine with one command: app:serve installs missing tools (PHP, Node, Composer, Herd, Docker), creates .env, sets up the database, runs migrations, builds assets, starts a queue worker and serves via Herd, Sail or artisan serve; app:down cleanly stops everything it sta
Branded, diagnostic error pages (500, 403, 404, 419, 503) for Filament — native Filament UI, dark mode and translations out of the box.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-05