vidhyar2612 / enveditor
Laravel 5.2 - Env Editor
v1.3.1
2017-02-08 16:58 UTC
This package is auto-updated.
Last update: 2024-09-15 13:17:22 UTC
README
安装
可以通过 Composer 安装 Enveditor 服务提供者
"require": {
"vidhyar2612/enveditor": "^1.0"
}
使用 composer 安装此包。
composer require vidhyar2612/enveditor
##注册包
在 app/config/app.php 中找到的 providers 数组中注册服务提供者
'providers' => array(
// ...
vidhyar2612\Enveditor\EnveditorServiceProvider::class
)
在 app/config/app.php 中找到的 aliases 数组中添加别名
'aliases' => array(
// ...
'Enveditor' => 'vidhyar2612\Enveditor\Facade',
)
使用方法
您可以通过 Enveditor 的外观或通过类型提示到抽象类 vidhyar2612\Enveditor\EnveditorStore
来访问 Enveditor 存储。
<?php Enveditor::set('ENV_KEY', 'ENV_VALUE'); Enveditor::get('ENV_KEY'); ?>
包功能
-
所有键和值的列表
-
创建带有值的新的键
-
编辑键的值
-
获取键的值
-
删除键
示例
Enveditor::all();
Enveditor::create('EXAMPLE_KEY' , '123456');
Enveditor::set('EXAMPLE_KEY' , '123');
Enveditor::get('EXAMPLE_KEY');
Enveditor::delete('EXAMPLE_KEY');
联系
如果您有任何问题或建议,请在 GitHub 上提交问题。
许可证
本存储库的内容在 MIT 许可证 下发布。