Git Product home page Git Product logo

laravel-quran's Introduction

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);
[
  "id" => 36
  "title" => "سُورَةُ يسٓ"
  "transliteration" => "Yaseen"
]

Get all ayah(s) from surah

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

laravel-quran's People

Contributors

kristories avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

laravel-quran's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.