Download the PHP package ivy47/hebcal-api without Composer
On this page you can find all versions of the php package ivy47/hebcal-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ivy47/hebcal-api
More information about ivy47/hebcal-api
Files in ivy47/hebcal-api
Package hebcal-api
Short Description Simple API implementation of Hebcal.com Jewish holiday calendars for Laravel
License MIT
Informations about the package hebcal-api
Laravel Hebcal Api Package
Simple API implementation of Hebcal.com Jewish holiday calendars for Laravel
This package implements:
- Jewish calendar REST API
- Hebrew Date Converter REST API
- Shabbat times REST API
- Zmanim (halachic times) API
- Yahrzeit + Anniversary API
Installation
composer require ivy47/hebcal-api
or add it to your composer.json and run composer update ivy47/hebcal-api
Publish Config File
The vendor:publish
commmand will publish a file named hebcal.php within your laravel project config folder config/hebcal.php.
php artisan vendor:publish --provider="Ivy47\HebcalApi\HebcalServiceProvider"
Published Config File Contents
To enable hebcal api requests cache - change use_cache
value to true. Also, you can set the cache store driver. For more details check Laravel driver-prerequisites documentation
Usage
Jewish calendar
Use HebcalApi Facade. To get the holidays use the HebcalApi
method getHolidays($params)
To see more details about params check Jewish calendar REST API documentation
To get hebcal items use $hebcalCalendarResponse->getItems()
method
If you need to get the holidays only for specific category, use categories filter & HebcalHelper
category constants:
Hebrew Date Converter
To convert date use HebcalApi
method convertDate($params)
To see more details about params check Hebrew Date Converter REST API
Shabbat times
To get just this week’s Shabbat times and Torah Portion use HebcalApi
method getShabbatTimes($params)
To see more details about params check Shabbat times REST API
Zmanim (halachic times)
To calculate zmanim (halachic times) for a given location use HebcalApi
method getZmanim($params)
To see more details about params check Zmanim (halachic times) API
Yahrzeit + Anniversary
To generate a list of Yahrzeit dates, Hebrew Birthdays, and Hebrew Anniversaries use HebcalApi
method generateYahrzeit($params)
To see more details about params check Yahrzeit + Anniversary API
Important
cfg
param default value is 'json' and can't be changed
API Resources
This package provides Laravel API Resources of Hebcal ready to use
To get the api resource use getResource()
method, on any HebcalResponse
But if you need raw (body) or decoded response data use:
or use the original response:
Useful Links
All versions of hebcal-api with dependencies
guzzlehttp/guzzle Version ^7.0.1
illuminate/support Version ^8.0
illuminate/http Version ^8.0
illuminate/database Version ^8.0
kevinrob/guzzle-cache-middleware Version ^3.3.1