承接 jenky/laravel-envloader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jenky/laravel-envloader

最新稳定版本:1.2.0

Composer 安装命令:

composer require jenky/laravel-envloader

包简介

Laravel 5 environment loader

README 文档

README

Latest Stable Version Total Downloads License

Load configs, providers, aliases based on the APP_ENV name in .env.

Installation

Require this package with composer:

composer require jenky/laravel-envloader ~1.0

or add this to composer.json

"jenky/laravel-envloader": "~1.0"

After updating composer, add the ServiceProvider to the providers array in config/app.php. Make sure the EnvLoaderServiceProvider is loaded before other app service providers.

'Jenky\LaravelEnvLoader\EnvLoaderServiceProvider',
// or 
Jenky\LaravelEnvLoader\EnvLoaderServiceProvider::class, // PHP 5.5

/*
 * Application Service Providers...
 */
App\Providers\AppServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
// ... 

Copy the package config to your local config with the publish command:

php artisan vendor:publish

The config files will be published to config/app/env

Usage

Modify the config files in config/app/env to suite your needs

/* configs.php */

return [
	'local' => [
		'app' => [
			'url' => 'http://myapp.local',
		],
	],
	'sandbox' => [
		'app' => [
			'url' => 'http://sandbox.myapp.com',
		],
	],
	'testing' => [
		'session' => [
			'driver' => 'file',
		],
	],
];

Multiple environments may be delimited using a "pipe" character

/* aliases.php */

return [
	'local|staging' => [
		'Debugbar' => 'Barryvdh\Debugbar\Facade',
	],
];

统计信息

  • 总下载量: 862
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-01