Laravel Quran is static Eloquent model for Quran.

Overview

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. Changes only occur in translation and transliteration.

Installation

Via Composer

$ composer require wearedevtical/laravel-quran

Usage

Find surah by ID

$surah = Surah::find(36);
36 "title" => "سُورَةُ يسٓ" "transliteration" => "Yaseen" ] ">
[
  "id" => 36
  "title" => "سُورَةُ يسٓ"
  "transliteration" => "Yaseen"
]

Get all ayah(s) from surah

$surah->ayahs;
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" ] ... ] ">
[
  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

$ayah  = Ayah::find(3787);
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" ] ">
[
  "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 for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING.md for details.

Security

If you discover any security related issues, please email author instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see the license file for more information.

You might also like...
Laravel package to create autonumber for Eloquent model

Laravel AutoNumber Laravel package to create autonumber for Eloquent model Installation You can install the package via composer: composer require gid

Turn any Eloquent model into a list!

Listify Turn any Eloquent model into a list! Description Listify provides the capabilities for sorting and reordering a number of objects in a list. T

This package provides a trait that will generate a unique uuid when saving any Eloquent model.

Generate slugs when saving Eloquent models This package provides a trait that will generate a unique uuid when saving any Eloquent model. $model = new

🔥 Fire events on attribute changes of your Eloquent model

class Order extends Model { protected $dispatchesEvents = [ 'status:shipped' = OrderShipped::class, 'note:*' = OrderNoteChanged:

Cast your Eloquent model attributes to Value Objects with ease.

Laravel Value Objects Cast your Eloquent model attributes to value objects with ease! Requirements This package requires PHP = 5.4. Using the latest

Add eloquent model events fired after a transaction is committed or rolled back

Laravel Transactional Model Events Add transactional events to your eloquent models. Will automatically detect changes in your models within a transac

Eloquent model-caching made easy.
Eloquent model-caching made easy.

Model Caching for Laravel Supporting This Package This is an MIT-licensed open source project with its ongoing development made possible by the suppor

Laravel package that converts your application into a static HTML website
Laravel package that converts your application into a static HTML website

phpReel Static Laravel Package phpReel Static is a simple Laravel Package created and used by phpReel that converts your Laravel application to a stat

A Laravel package that adds a simple image functionality to any Laravel model
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Releases(v1.0.0)
Owner
Devtical
Devtical
A laravel package to generate model hashid based on model id column.

Laravel Model Hashid A package to generate model hash id from the model auto increment id for laravel models Installation Require the package using co

Touhidur Rahman 13 Jan 20, 2022
A package to filter laravel model based on query params or retrieved model collection

Laravel Filterable A package to filter laravel model based on query params or retrived model collection. Installation Require/Install the package usin

Touhidur Rahman 17 Jan 20, 2022
Laravel-model-mapper - Map your model attributes to class properties with ease.

Laravel Model-Property Mapper This package provides functionality to map your model attributes to local class properties with the same names. The pack

Michael Rubel 15 Oct 29, 2022
Laravel comments - This package enables to easily associate comments to any Eloquent model in your Laravel application

Laravel comments - This package enables to easily associate comments to any Eloquent model in your Laravel application

Rubik 4 May 12, 2022
This Laravel package merges staudenmeir/eloquent-param-limit-fix and staudenmeir/laravel-adjacency-list to allow them being used in the same model.

This Laravel package merges staudenmeir/eloquent-param-limit-fix and staudenmeir/laravel-adjacency-list to allow them being used in the same model.

Jonas Staudenmeir 5 Jan 6, 2023
Collection of the Laravel/Eloquent Model classes that allows you to get data directly from a Magento 2 database.

Laragento LAravel MAgento Micro services Magento 2 has legacy code based on abandoned Zend Framework 1 with really ugly ORM on top of outdated Zend_DB

Egor Shitikov 87 Nov 26, 2022
A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache.

Laravel OTP Introduction A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache. The ca

Lim Teck Wei 52 Sep 6, 2022
A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

Laravel MongoDB This package adds functionalities to the Eloquent model and Query builder for MongoDB, using the original Laravel API. This library ex

Jens Segers 6.3k Jan 7, 2023
Generate UUID for a Laravel Eloquent model attribute

Generate a UUIDv4 for the primary key or any other attribute on an Eloquent model.

Alex Bouma 4 Mar 1, 2022
A DynamoDB based Eloquent model and Query builder for Laravel.

Laravel DynamoDB A DynamoDB based Eloquent model and Query builder for Laravel. You can find an example implementation in kitar/simplechat. Motivation

Satoshi Kita 146 Jan 2, 2023