rootxs/sudobible-laravel

SudoBible 的 Laravel 服务提供者。

0.0.3 2015-07-30 03:25 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:06:02 UTC


README

Laravel 服务提供者,用于 SudoBible

安装与设置

通过在项目的 composer.json 文件中添加 rootxs/sudobible-laravel 包到 require 对象,使用 Composer 安装 SudoBible 服务提供者。

{
	...
	"require": {
		"rootxs/sudobible-laravel": "dev-master"
	},
	...
}

注意: 此包自动需要 rootxs/sudobible,因此您不需要在 composer.json 中单独添加它。

然后运行 composer update

接下来,将 SudoBible 服务提供者添加到 config/app.php 文件的 providers 数组中。

    'providers' => array(
        ...
        'RootXS\SudoBibleServiceProvider',
    )

将 SudoBible 门面添加到 config/app.php 文件的 aliases 数组中。

    'aliases' => array(
        ...
        'SudoBible' => 'RootXS\SudoBibleFacade',
    )

配置

以下环境变量用于配置 SudoBible

SUDOBIBLE_DB_HOST
SUDOBIBLE_DB_USER
SUDOBIBLE_DB_PASS
SUDOBIBLE_DB_NAME
SUDOBIBLE_TRANSLATION // optional

可选

要自定义配置选项,请使用 Artisan 发布配置文件。

php artisan vendor:publish

更新生成的 app/config/sudobible.php 配置文件中的设置。

使用方法

SudoBible::verse('John', 3, 16);