Internal Laravel package: natal chart engine (tropical Western + sidereal Vedic) with an interactive D3 chart renderer. Built on Swiss Ephemeris via jayeshmepani/swiss-ephemeris-ffi. Verified against Cafe Astrology and swetest to the arcsecond.
composer require crumbls/astrology
php artisan swisseph:installswisseph:install downloads the three required .se1 data files and builds the swetest binary (macOS or Linux). It's idempotent — re-running with no --force only fetches what's missing.
Then enable PHP FFI in your environment:
- Herd / Valet: open Herd → PHP → INI tab → add
ffi.enable=true→ save (auto-restarts FPM). - CLI works without changes (CLI defaults to
ffi.enable=preloadwhich still permits FFI from CLI).
use Crumbls\Astrology\Services\NatalChartService;
$svc = app(NatalChartService::class);
$birth = new DateTimeImmutable('1984-04-19 05:00:00', new DateTimeZone('UTC'));
$chart = $svc->chart($birth, latitude: 38.31667, longitude: -107.78333);
// Returns: birth, mode, ayanamsa, ascendant, midheaven, vertex,
// part_of_fortune, planets, houses, placidus_cusps, aspects.For a Vedic chart (with nakshatras, padas, Vimshottari dashas):
$chart = $svc->chart($birth, 38.31667, -107.78333, NatalChartService::MODE_SIDEREAL);Visit /astro/chart for an interactive D3 chart wheel with hover tooltips, aspect line highlighting, and a form to compute new charts. Disable with ASTROLOGY_DEMO_ROUTE=false.
php artisan astro:chart "1984-04-19 05:00:00" --lat=38.31667 --lng=-107.78333 --tz=UTC
php artisan astro:chart "1990-05-15 14:30:00" --lat=40.7128 --lng=-74.0060 --jsonChart results are cached via Cache::rememberForever() keyed on (UTC timestamp, lat, lng, mode). First call ~2ms; subsequent reads ~0.2ms. Use ASTROLOGY_CACHE_STORE=redis (or any cache store name) to override the default store.
SynastryService— cross-aspects between two chartsCompositeService— midpoint composite chartsAshtakootaService— Vedic Guna Milan (36-point matrimonial compatibility)- Pluggable interpretation-content store