vyNatu /database-config
覆盖配置外观以提供双栈(数据库 + 文件系统)配置系统。首先检查数据库,然后检查文件系统
1.0
2017-04-25 17:58 UTC
Requires
- php: >=7.0
- illuminate/support: ^5.0
This package is not auto-updated.
Last update: 2024-09-27 23:05:00 UTC
README
此软件包允许您将一些配置项动态保存到数据库中。当您想创建一个界面,让用户实时更改邮件设置或其他类型的配置时,非常有用。
安装
composer require vynatu/database-config
然后,将服务提供者添加到 app.php
<?php 'providers' => [ ... Vynatu\DatabaseConfig\ConfigServiceProvider::class, ]
php artisan migrate
Vynatu/Database-Config 不需要别名。它替换了默认的
config()或\Config::class绑定。
用法
<?php // To permanently save items in the database config()->set('mail.driver', 'mailgun', true); // The last argument sets wether or not to make this change permanent.