ubitcorp/laravel-settings
Composer 安装命令:
composer require ubitcorp/laravel-settings
包简介
It provides a settings model that can be used with trait on any model for Laravel project
README 文档
README
Laravel Settings
It provides a settings model that can be used with trait on any model for Laravel project
Installation
Via Composer
$ composer require ubitcorp/laravel-settings
If you want to use different table name instead of settings
$ php artisan vendor:publish --provider="ubitcorp\Settings\ServiceProvider"
Then you can change config/settings.php configuration file for table name. Then you should run:
$ php artisan migrate
Usage
This package provides the hasSettings trait that can be included any model. After that the functions below can be used:
settings()
addSetting($keyword, $value)
addSettings($settings)
removeSetting($keyword)
removeSettings($keywords)
syncSettings($settings)
valueofSetting($keyword)
valueOfSettingAsArray($keyword)
统计信息
- 总下载量: 54
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-01