faizshukri / phpquran

PHP Al-Quran Package
MIT License
42 stars 13 forks source link

How to use the Peckage #7

Closed Bilal44559 closed 11 months ago

Bilal44559 commented 1 year ago

Hi, I am trying to use the peckage in my Laravel project and i am facing some problems while implementing and using it, i installed the peckage as told in the description, but i am facing difficulty in using it, Could you please guide me i mean how the peckage is working and flow of the peckage. and how to use it in the view, Thanks in advance.

faizshukri commented 1 year ago

Hi @Bilal44559,

Can you elaborate more what issue you're facing?

This is a simple example how you can do it from route after installing the package. (Laravel 10, PHP 8.2)

<?php
// routes/web.php
use Illuminate\Support\Facades\Route;
use FaizShukri\Quran\Quran;

Route::get('/', function (Quran $quran) {
    dump($quran->translation('ar,en')->get('1:1-7'));
});

image