Laravel Prayer Times
Prayer times in Laravel without an API call — and matching the browser exactly.
composer require devix-labs/laravel-prayer-times
Live demo coming soon
Fourteen calculation methods with the minute adjustments each authority publishes, country presets so a timetable matches the mosque, both madhabs, high-latitude and polar rules, next-prayer countdowns, monthly timetables, Qiyam portions and the qibla. A facade over one configured place, a @prayerTime Blade directive and php artisan prayer:times. Checked two ways: 1 210 comparisons against adhan for the astronomy, and 704 shared vectors against the JavaScript package.
What you get
No API call
Prayer times are arithmetic. Computing them locally removes a dependency, a rate limit and a privacy question.
One configured place
Coordinates, country, madhab and zone in config; the facade, the directive and the command all inherit them.
Country presets
{ country: 'AE' } brings the method and the authority's published minute adjustments, so the sheet matches the mosque rather than the raw astronomy.
Checked twice
1 210 adhan comparisons for the astronomy and 704 vectors for parity with the browser — both run inside this package's tests.
Artisan and Blade
@prayerTime('fajr') in a template, and php artisan prayer:times --month=2026-09 for a printable timetable.
Honest at high latitudes
Three rules plus a polar resolution that keeps the prayers in order, and estimated: true on anything inferred.
Laravel Prayer Times — overview
Why it exists
Prayer times on the server usually mean an HTTP call to someone's API — a dependency, a rate limit and a privacy question for something that is pure arithmetic. The PHP libraries that do compute them are thin on methods and none of them matches a JavaScript implementation, so a page that renders a timetable server-side and updates it in the browser can show two different answers.
What it does
- One configured place. Coordinates, country, madhab and zone in config; every call inherits them.
- Country presets carrying each authority's published minute adjustments.
- Checked twice: 1 210 adhan comparisons for the astronomy, 704 vectors for parity with the browser.
- Laravel where you want it: facade, Blade directive, artisan command.
Not in 1.0
The Moonsighting Committee's seasonal Fajr and Isha — a different algorithm, and shipping angles under that name would mislead. A hosted API and a mosque display mode are the Pro edition's shape.
How it compares
Questions
Why not call an API?
Because this is arithmetic, and an API adds a dependency, a rate limit, a failure mode and a record of where your users are. The whole calculation is a few hundred lines and runs in microseconds.
Will it match my mosque?
Usually, if you set country: most differences come from the minute adjustments authorities publish, which the presets carry. If your mosque still differs, add your own adjustments in config.
Does it agree with the JavaScript package?
Exactly, and it is asserted: 704 shared vectors run here. A timetable rendered server-side and refreshed in the browser cannot disagree.
How accurate is the astronomy?
Measured against adhan across 1 210 combinations of place, method, date and madhab — every time within a minute. That fixture runs in this package's test suite too, not just the JavaScript one.
Can I serve several cities?
Yes — pass latitude, longitude and country per call and they override the config for that call only.
More from Devix
All resources →Laravel Phone
Laravel package
Phone validation, casts and a Blade component that agree with Phone Input exactly.
Laravel Validators
Laravel package
Validation rules for regional IDs, tax numbers and IBANs.
Laravel Cookie Consent
Laravel package
Consent banner middleware with a proof-of-consent log.