otifsolutions/laravel-settings
最新稳定版本:1.0.1
Composer 安装命令:
composer require otifsolutions/laravel-settings
包简介
This package creates a complete generic Settings Table and structure to be used in project. For Laravel.
README 文档
README
Requirements
PHP 7 > PHP 7.1
How to use the library
Install via the composer
Using the composer(Recomended)
Either run the following command in the root directory of your project:
composer require otifsolutions/laravel-settings
Then simply run migrations to run the Setting Migration
php artisan migrate
Namespace for Model Setting
use OTIFSolutions\Laravel\Settings\Models\Setting;
Update or Create a new Setting
Setting::set('KEY_GOES_HERE','VALUE_GOES_HERE','TYPE_GOES_HERE')
Type can be : 'STRING','BOOL','INT','JSON','DOUBLE'
Get a Setting
Setting::get('KEY_GOES_HERE')
If Setting does not exist the system will return null
Delete a Setting
Setting::remove('KEY_GOES_HERE')
If Setting does not exist the system will return null
Details
This pakage is used to add generic Settings structure to the Laravel project.
统计信息
- 总下载量: 4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-04