stellarsecurity/esim-laravel
Composer 安装命令:
composer require stellarsecurity/esim-laravel
包简介
Thin Laravel client for Stellar Simcard API (/v1/sim/*).
README 文档
README
Thin Laravel client for the Stellar Simcard API.
The Simcard API exposes:
GET /v1/sim/plansPOST /v1/sim/orderGET /v1/sim/query/{planId}
This package just makes it easy to call those endpoints from any Laravel project.
No controllers, no routes, no migrations. You keep your own API; this package just gives you a typed client.
Installation
composer require stellarsecurity/esim-laravel
Laravel will auto-discover the service provider.
Optionally publish the config:
php artisan vendor:publish --tag=sim-config
Configuration (.env)
SIM_API_BASE_URL=https://sim-api.stellar.your-domain.com/api SIM_API_USERNAME=your-basic-auth-username SIM_API_PASSWORD=your-basic-auth-password
These are the credentials and base URL of the Simcard API that actually owns the /v1/sim/* routes.
Usage
Inject SimApiClient anywhere in your app:
use StellarSecurity\EsimLaravel\Client\SimApiClient; class SomeService { public function __construct( private readonly SimApiClient $simApi, ) {} public function example(): void { // Get plans $plans = $this->simApi->plans(); // Create order $orderResponse = $this->simApi->order([ 'plan_id' => 'client-generated-plan-id', 'packageCode' => 'EU_10GB_30DAYS', 'account_ref' => 'optional-account-ref', ]); // Query by plan_id $status = $this->simApi->query('client-generated-plan-id'); } }
Or use it directly in a controller:
use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use StellarSecurity\EsimLaravel\Client\SimApiClient; class EsimController { public function __construct( private readonly SimApiClient $simApi, ) {} public function plans(Request $request): JsonResponse { $plans = $this->simApi->plans($request->all()); return response()->json($plans); } }
What this package is not
- It is not the Simcard API itself.
- It does not define routes or controllers.
- It does not define the
simcardstable.
It is a small HTTP client so your other projects can talk to the Simcard API's:
/v1/sim/plans/v1/sim/order/v1/sim/query/{planId}
using configured base URL + basic auth, without copy/pasting HTTP calls every time.
stellarsecurity/esim-laravel 适用场景与选型建议
stellarsecurity/esim-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 101 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 stellarsecurity/esim-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stellarsecurity/esim-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 101
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-11