AstroWay/api v2.74.0 · de
alle Systeme in Ordnung
// sdk · Laravel

Laravel ServiceProvider für die AstroWay API

Offizielles `astroway/sdk-laravel` auf Packagist — ein ServiceProvider + Fassade auf Basis von `astroway/sdk`. Automatisch erkannt via `composer.json` `extra.laravel.providers`, `Astroway\Astroway` als Container-Singleton registriert, Konfiguration veröffentlicht via `php artisan vendor:publish`. In Controller einfügen oder die Fassade `Astroway::post("/chart", ...)` verwenden. Funktioniert mit Laravel 10/11/12, PHP 8.1+.

// 01 / install

Installieren

composer require astroway/sdk-laravel

Import: use Astroway\Astroway;

// 02 / highlights

Highlights

// 03 / first request

Erste Anfrage

<?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 mit Laravel

10.000 Credits kostenlos pro Monat. Open-Source SDK, generiert aus OpenAPI 3.1, immer synchron mit dem Backend.

99,9% SLA · kostenpflichtige Tarife · 30 Tage Status →