https://github.com/devtical/laravel-quran
Laravel Quran is static Eloquent model for Quran.
https://github.com/devtical/laravel-quran
alquran islam laravel laravel-package muslim quran
Last synced: about 1 month ago
JSON representation
Laravel Quran is static Eloquent model for Quran.
- Host: GitHub
- URL: https://github.com/devtical/laravel-quran
- Owner: devtical
- License: mit
- Created: 2021-07-24T17:53:30.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-03-04T11:00:02.000Z (over 3 years ago)
- Last Synced: 2025-04-07T15:01:33.666Z (2 months ago)
- Topics: alquran, islam, laravel, laravel-package, muslim, quran
- Language: PHP
- Homepage:
- Size: 1.14 MB
- Stars: 22
- Watchers: 1
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Quran
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
Laravel Quran is static Eloquent model for Quran.
The Quran has never changed and never will, because Allah protecting it. ```(15:9) إِنَّا نَحۡنُ نَزَّلۡنَا ٱلذِّكۡرَ وَإِنَّا لَهُۥ لَحَـٰفِظُونَ```. All data is fetched from the [API](https://alquran.cloud/api). Changes only occur in translation and transliteration.
## Installation
Via Composer
``` bash
$ composer require wearedevtical/laravel-quran
```## Usage
Find surah by ID
```php
$surah = Surah::find(36);
``````bash
[
"id" => 36
"title" => "سُورَةُ يسٓ"
"transliteration" => "Yaseen"
]
```Get all ayah(s) from surah
```php
$surah->ayahs;
``````bash
[
0 => array:7 [
"id" => 3706
"surah_id" => "36"
"content" => "بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ يسٓ"
"translate_en" => "O THOU human being!"
"translate_id" => "Yaa siin"
"number" => "1"
"juz" => "22"
]
1 => array:7 [
"id" => 3707
"surah_id" => "36"
"content" => "وَٱلْقُرْءَانِ ٱلْحَكِيمِ"
"translate_en" => "Consider this Qur’an full of wisdom:"
"translate_id" => "Demi Al Quran yang penuh hikmah,"
"number" => "2"
"juz" => "22"
]
...
]
```Find ayah by ID
```php
$ayah = Ayah::find(3787);
``````bash
[
"id" => 3787
"surah_id" => "36"
"content" => "إِنَّمَآ أَمْرُهُۥٓ إِذَآ أَرَادَ شَيْـًٔا أَن يَقُولَ لَهُۥ كُن فَيَكُونُ"
"translate_en" => "His Being alone is such that when He wills a thing to be, He but says unto it, “Be” — and it is."
"translate_id" => "Sesungguhnya keadaan-Nya apabila Dia menghendaki sesuatu hanyalah berkata kepadanya: "Jadilah!" maka terjadilah ia."
"number" => "82"
"juz" => "23"
]
```## Change log
Please see the [changelog](CHANGELOG.md) for more information on what has changed recently.
## Testing
``` bash
$ composer test
```## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email author instead of using the issue tracker.
## Credits
- [Wahyu Kristianto](https://github.com/kristories)
- [Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram](https://github.com/meezaan)
- [Islamic Network](https://islamic.network)
- [Tanzil](https://tanzil.net)
- [All Contributors](https://github.com/wearedevtical/laravel-quran/graphs/contributors)## License
The MIT License (MIT). Please see the [license file](LICENSE.md) for more information.