AstroWay/api v2.254.12 · sdks
all systems operational
// sdk · Laravel

Laravel ServiceProvider for the AstroWay API

Official astroway/sdk-laravel on Packagist - a ServiceProvider + facade on top of astroway/sdk. Auto-discovered via composer.json extra.laravel.providers, Astroway\Astroway registered as a container singleton, config published via php artisan vendor:publish. Inject into controllers or use the facade Astroway::post("/chart", ...). Works with Laravel 10/11/12, PHP 8.1+.

// 01 / install

Install

composer require astroway/sdk-laravel:^0.1.0-alpha

import: use Astroway\Astroway;

// 02 / highlights

Highlights

// 03 / first request

Make your first request

<?php
// .env: ASTROWAY_API_KEY=aw_live_...

use Astroway\Astroway;
use Illuminate\Http\JsonResponse;

class ChartController extends Controller
{
    public function __invoke(Astroway $astroway): JsonResponse
    {
        $chart = $astroway->post('/chart', body: [
            'date'           => '1990-07-14',
            'time'           => '14:30:00',
            'timezoneOffset' => 3,
            'latitude'       => 50.4501,
            'longitude'      => 30.5234,
            'houseSystem'    => 'P',
        ]);
        return response()->json($chart);
    }
}

Start building with Laravel

10,000 credits free per month. Open-source SDK, generated from OpenAPI 3.1, always in sync with the backend.

99.9% SLA · paid plans · 30d status →