定制 astroway/sdk-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

astroway/sdk-laravel

最新稳定版本:v0.1.0-alpha.1

Composer 安装命令:

composer require astroway/sdk-laravel

包简介

Laravel ServiceProvider + facade for astroway/sdk — astroway() helper, config publishing, env-driven setup.

README 文档

README

Official Laravel ServiceProvider + facade for astroway/sdk — auto-discovered, env-driven, container singleton.

Packagist version

Install

composer require astroway/sdk-laravel
php artisan vendor:publish --tag=astroway-config

ServiceProvider + facade auto-register via composer.json's extra.laravel.providers — no edit to config/app.php needed.

Configure

.env:

ASTROWAY_API_KEY=aw_live_…
ASTROWAY_BASE_URL=https://api.astroway.info/v1   # optional
ASTROWAY_TIMEOUT=30                                # optional, seconds
ASTROWAY_AUTH_SCHEME=header                        # optional, header|bearer

config/astroway.php (published from the package) pulls these from env().

Use

Via dependency injection

use Astroway\Astroway;

class ChartController extends Controller
{
    public function __construct(private readonly Astroway $astroway) {}

    public function store(Request $request)
    {
        return response()->json(
            $this->astroway->chart()->compute($request->all()),
        );
    }
}

Via facade

use Astroway\Laravel\Facades\Astroway;

return Astroway::chart()->compute(['date' => '1990-01-15', ...]);

Via container alias

$aw = app('astroway');
$chart = $aw->chart()->compute([...]);

Roadmap

  • 0.1.0-alpha.x — ServiceProvider + facade + config publish (current).
  • 0.1.0-beta.1 — Telescope integration (every Astroway call visible in Telescope HTTP tab).
  • 0.1.0-rc.1 — Artisan commands (php artisan astroway:health, astroway:credits).
  • 0.1.0 — stable surface freeze.

Links

License

MIT — see LICENSE.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固