adnane / laravel-qibla
A laravel Package to get qibla directionns
1.0.0
2021-04-12 17:14 UTC
README
- a laravel package to get the Qiblaa direction based on given cords or user location
installation
- via composer :
composer require adnane/laravel-qibla
- the package's service provider will be auto-loaded as you can add it in
config\app.php
in the providers array
'providers' => [ .. 'Adnane\Qibla\QiblaServiceProvider', ],
Usage
use Adnane\Qibla\Qibla; // get Qibla direction based on user location echo Qibla::getDirection(); // As you can specify a longitude & latitude to calculate the Qibla direction from echo Qibla::getDirection($longitude , $latitude);
Usage in blade files
Hey User .. The kibla direction is about @qibla() ° North
how to interpretate the results
- as mentioned ,Results are angles returned in degree scale : ex (108.2323° north) , so this can be easy to be handled using a degree compass or a front-end simple logic to achieve that.