PHP Classes


Recommend this page to a friend!
  Classes of Zacchaeus Bolaji  >  Laravel PHP Bible  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Laravel PHP Bible
Retrieve content from the Holy Bible
Author: By
Last change:
Date: 1 year ago
Size: 4,563 bytes


Class file image Download

Laravel Bible

CircleCI Latest Stable Version Total Downloads License Scrutinizer Code Quality Code Intelligence Status Maintainability StyleCI Code Coverage

Laravel Bible helps you fetch from the Holy Bible


Step 1

You can install the package via composer:

composer require djunehor/laravel-bible

Laravel 5.5 and above

The package will automatically register itself, so you can start using it immediately.

Laravel 5.4 and older

In Laravel version 5.4 and older, you have to add the service provider in config/app.php file manually:

'providers' => [
    // ...


After installing the package, you will have to register it in bootstrap/app.php file manually:

// Register Service Providers
    // ...

Step 2 - Publishing files

Run: php artisan vendor:publish --tag=laravel-bible This will move the migration file, seeder file and config file to your app. You can change the entries table name in config/laravel-grammar.php


use Djunehor\Logos\Bible;`

$bible = new Bible();

Get the Book of John

$john = $bible->getBook();

Get All Verses in Matthew Chapter 3

$verses = $bible->getChapter();

Get the Book of Mark, Chapter 3, Verse 12

$verse = $bible->getVerse();

Using shortcut

// get Genesis 22:6
$verse = $bible->get('Genesis 22:6');


//Bible Class accepts 2 parameters: $lang and $version
$lang = 'en';

$bible = new Bible('en'); //use English version
$bible = new Bible('en', 'kjv'); // use English KJV bible

Using Facade

In order to use the Bible facade: - First add 'Bible' => Djunehor\Logos\Facades\BibleFacade::class, to aliases in config/app.php - Then use like Bible::get('John 3:16');

Using Helper

The package ships with a bible() method

bible('John 3:16');

Dynamically setting language and/or version

$bible = new Bible(); // lang is set to "en", and version is set to "kjv" by default;
$bible->lang('yo'); // Set language as Yoruba
$bible->version('amp'); // Set version to Amplified Version

Currently Supported Languages and Versions

|Language|Code|Versions| |:--------- | :-----------------: | :------: | |English|en|kjv|

Add new language and bible version

Simply follow the structure of the bibles/en folder


  • Fork this project
  • Clone to your repo
  • Make your changes and run tests `composer test`
  • Push and create a pull request


  • The KJV English bible JSON file was sourced from here
For more information send a message to info at phpclasses dot org.