1. Go to this page and download the library: Download prevailexcel/laravel-bible 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/ */
use Illuminate\Support\Facades\Route;
use PrevailExcel\Bible\Facades\Bible;
Route::get('/bible-verse', function () {
request()->book = 'JHN';
request()->chapter = 3;
request()->verse = 16; // You can set requests from your form
return Bible::verse();
// or simply
return Bible::verse(16, 3, 'JHN'); // You can pass to method directly
});
Route::get('/bible-search', function () {
request()->term = 'King solomon';
return bible()->search(); // You can also use the bible() helper.
});
/**
* This is the method to get the full list of availble bibles, you can copy the id of the version you want, alonside and name you want to call it and add it to your config/bible.php.
* @returns array
*/
Bible::bibles();
/**
* Alternatively, use the helper.
*/
bible()->bibles();
/**
* This is the method to get a particular bible version.
* Leave empty to use the default version
* @param string|null $version
* @return array
*/
Bible::bible();
/**
* Alternatively, use the helper.
*/
bible()->bible('igbo');
/**
* This is the method to get list of books in a particular bible version.
* Leave empty to use the default version
* @param string|null $version
* @return array
*/
Bible::books('kjv');
/**
* Alternatively, use the helper.
*/
bible()->books();
/**
* This is the method to get a book from the bible.
* @param string $book
* @return array
*/
Bible::book('GEN');
/**
* Alternatively, use the helper.
*/
bible()->book('MAT');
/**
* This is the method to get a chapter from a book from the bible.
* @param string $chapter
* @param string $book
* @return array
*/
Bible::chapter(23, 'LUK');
/**
* Alternatively, use the helper.
*/
bible()->chapter(5, 'MAT');
/**
* This is the method to get full list of verses of a chapter from a book from the bible.
* @param string $chapter
* @param string $book
* @return array
*/
Bible::verses(23, 'LUK');
/**
* Alternatively, use the helper.
*/
bible()->verses(5, 'MAT');