PHP code example of crumbls / astrology

1. Go to this page and download the library: Download crumbls/astrology library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

crumbls / astrology example snippets


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.

$chart = $svc->chart($birth, 38.31667, -107.78333, NatalChartService::MODE_SIDEREAL);
bash
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 --json