PHP code example of yugo / laravel-quran

1. Go to this page and download the library: Download yugo/laravel-quran library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yugo / laravel-quran example snippets


use Yugo\Quran\Facades\Quran;

$surah = Quran::surah(1);
$verse = $surah->verse(10);
$attribution = Quran::attribution();

use Yugo\Quran\Contracts\QuranProvider;
use Yugo\Quran\Facades\Quran;

Quran::extend('custom', fn (): QuranProvider => new CustomQuranProvider);

public function getSurah(int $number): Surah;

/**
 * @return array{label: string, url: string}
 */
public function getAttribution(): array;
bash
php artisan vendor:publish --tag=quran-config