PHPackages                             jhonoryza/laravel-prayertime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jhonoryza/laravel-prayertime

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jhonoryza/laravel-prayertime
============================

1.2.2(9mo ago)0275↓50%1MITPHPPHP ^8.2

Since Mar 12Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/jhonoryza/laravel-prayertime)[ Packagist](https://packagist.org/packages/jhonoryza/laravel-prayertime)[ RSS](/packages/jhonoryza-laravel-prayertime/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (7)Versions (9)Used By (0)

Laravel Prayertime
==================

[](#laravel-prayertime)

 [ ![Total Downloads](https://camo.githubusercontent.com/742242406ef4eb63a131526c3fd566f2698fb03e1ab7770deeb095b59209d891/68747470733a2f2f706f7365722e707567782e6f72672f6a686f6e6f72797a612f6c61726176656c2d70726179657274696d652f642f746f74616c2e737667) ](https://packagist.org/packages/jhonoryza/laravel-prayertime) [ ![Latest Stable Version](https://camo.githubusercontent.com/b745d401f26d43e6135e9c569d55c7a18f853b1db07688a4c04abf150c2c25d3/68747470733a2f2f706f7365722e707567782e6f72672f6a686f6e6f72797a612f6c61726176656c2d70726179657274696d652f762f737461626c652e737667) ](https://packagist.org/packages/jhonoryza/laravel-prayertime) [ ![License](https://camo.githubusercontent.com/2b3046b01e206ac91aab3c1662da19e3affd2b401c41f96c53638d39b0910a82/68747470733a2f2f706f7365722e707567782e6f72672f6a686f6e6f72797a612f6c61726176656c2d70726179657274696d652f6c6963656e73652e737667) ](https://packagist.org/packages/jhonoryza/laravel-prayertime)

install
-------

[](#install)

```
composer require jhonoryza/laravel-prayertime
```

run migration

```
php artisan migrate
```

this will create 3 tables: provinces, cities and prayertimes table

publish config file

```
php artisan vendor:publish --tag=prayertime-config
```

sources
-------

[](#sources)

you can choose from one of this source by configuring config file `prayertime.php`

1. manual calculation : reference from prayertimes.org
2. crawling bimasislam kemenag website
3. api from myquran.com (sebelumnya domain )

sync predefined city and province data
--------------------------------------

[](#sync-predefined-city-and-province-data)

get city data from the source and save it to the database

```
php artisan pray:sync-city
```

sync prayer times
-----------------

[](#sync-prayer-times)

get prayer times from the source and save it to the database

```
php artisan pray:sync-times
```

general usage
-------------

[](#general-usage)

```
public function getPrayerTimes(string $provinceId, string $cityId, int $month, int $year): array
```

example :

```
