Download the PHP package faizshukri/phpquran without Composer
On this page you can find all versions of the php package faizshukri/phpquran. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package phpquran
PHP Quran
PHP Quran was created and is maintained by Faiz Shukri. This package allow developer to retrieve quran ayah and translation easily.
Installation
PHP 7+/8+ is required. (5.6 is supported in v1.x)
This project can be installed via [Composer]:
Laravel Integration
PHP Quran has optional support for Laravel and comes with a Service Provider and Facades for easy integration.
Laravel version starting 5.5+ can use Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
Laravel without auto-discovery
Open your Laravel config file config/app.php and add the following lines.
In the $providers array add the service providers for this package.
Add the facade of this package to the $aliases array.
Now the Quran Class will be auto-loaded by Laravel.
Configuration
PHP Quran supports optional configuration for Laravel.
To get started, you'll need to publish the config.
This will create a config/quran.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.
There are several config options:
-
storage_pathBy default, the app will download and store quran files in
storage/app/qurandirectory. You may change the value to your own. However the path will be reside understorage/appdirectory. -
translationsSpecify translations that you want to make available for use. Make sure you add translation here before use in the code.
-
limitDefault limits per query are
15 ayahand3 translations. -
structureStructure of the data. Default is
minimalwhich remove all unnecessary parent.fixedwill make structure more consistent.
Console
PHP Quran also ship a binary file to be used in console. You can access directly from vendor/bin/quran, or if you want to access it from anywhere, you can install PHP Quran globally and put your composer global directory path to your working environment's $PATH.
Usage
Console
PHP Quran can be used in console like this.
Surah name
You can also specify surah by its name. If the surah specified cannot found, it will find the closest one first and will suggest to you if more than a surah is found.
Translation
Translation can also be configured via console. It will be saved in the configuration file. (run quran config:path to see where the file is located).
Contributers
Thanks to the following people and organization for helping out this project;
| Name | Link |
|---|---|
![]() |
Tanzil.Net |
| Hussaini Zulkifli | @hussaini |
License
The PHP Quran code is open-sourced software licensed under the MIT license


