PHP Classes

Laravel PHP Bible: Retrieve content from the Holy Bible

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 93 All time: 9,906 This week: 46Up
Version License PHP version Categories
laravel-bible 1.0.0Custom (specified...5PHP 5, Content management
Description 

Author

This package can be used to retrieve content from the Holy Bible.

It provides the content of the Holy Bible that can be returned in pieces divided by books, chapters and verses.

The package contains the whole content of the Holy Bible in English. It can support other languages if the respective files for those languages are provided within the package in JSON format.

Innovation Award
PHP Programming Innovation award nominee
December 2019
Number 6
The Holy Bible is a very well known book that contains stories and other texts of interest to religious people.

This package provides means to retrieve content of the bible in English.

It may also provide the bible content in other languages, as long as the respective bible files for those languages are added to the package.

Manuel Lemos
Picture of Zacchaeus Bolaji
  Performance   Level  
Innovation award
Innovation award
Nominee: 12x

Winner: 1x

 

Documentation

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

Installation

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' => [
    // ...
    Djunehor\Logos\BibleServiceProvider::class,
];

Lumen

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

// Register Service Providers
    // ...
    $app->register(Djunehor\Logos\BibleServiceProvider::class);
];

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

Usage

use Djunehor\Logos\Bible;`

$bible = new Bible();

Get the Book of John

$bible->book('John');
$john = $bible->getBook();

Get All Verses in Matthew Chapter 3

$bible->book('Matthew');
$bible->chapter(3);
$verses = $bible->getChapter();

Get the Book of Mark, Chapter 3, Verse 12

$bible->book('Mark');
$bible->chapter(3);
$bible->verse(12);
$verse = $bible->getVerse();

Using shortcut

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

Options

//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

Contributing

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

Acknowledgement

  • The KJV English bible JSON file was sourced from here

  Files folder image Files (82)  
File Role Description
Files folder image.circleci (1 file)
Files folder imagebibles (1 directory)
Files folder imagesrc (2 files, 2 directories)
Files folder imagetests (3 files)
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:93
This week:0
All time:9,906
This week:46Up