Ever wished your PHP application could tell users their zodiac sign without you having to remember whether Gemini starts in May or June? Enter Intervention Zodiac, a delightfully focused package created by Oliver Vogel that brings celestial calculations to your web applications with elegant simplicity.
Key Features
- Sign Determination: Calculate Western zodiac signs from birth dates
- Localized Sign Names: Access sign names in multiple languages
- Compatibility Determination: Calculate zodiac sign compatibility between two signs
- Simple API: Easy integration with existing PHP and Laravel applications
Example
<?phpuse Intervention\Zodiac\Calculator; // calculate zodiac sign$zodiac = Calculator::zodiac('1985-03-06'); $name = $zodiac->name(); // 'pisces'$html = $zodiac->html(); // '♓'$localized = $zodiac->localized('fr'); // Poissons$compatibility = $zodiac->compatibility($zodiac); // .5
Whether you're building a user profile feature that includes zodiac information or incorporating astrological components into your platform, this package provides the tools you need without the complexity.
Give it a try by installing the package using Composer:
composer require intervention/zodiac
Read the official documentation to learn more about this package and view the source code on GitHub.