overtrue/laravel-options
Composer 安装命令:
composer require overtrue/laravel-options
包简介
Global options module for Laravel application.
README 文档
README
Global options module for Laravel application.
Installation
You can install the package via composer:
composer require overtrue/laravel-options
Publish configuration and migrations
$ php artisan vendor:publish --provider="Overtrue\LaravelOptions\OptionsServiceProvider"
Run migrations
$ php artisan migrate
Usage
// set \Option::set('foo', 'bar'); \Option::set(['foo' => 'bar', 'bar' => 'baz']); // get \Option::get('foo'); // bar \Option::get(['foo', 'bar']); // ['foo' => 'bar', 'bar' => 'baz'] \Option::all(['foo', 'bar']); // ['foo' => 'bar', 'bar' => 'baz'] // get all \Option::get(); // or \Option::all(); // check exists \Option::has('foo'); // true \Option::remove('foo'); \Option::remove(['foo', 'bar']);
Console commands
It is also possible to set options within the console:
php artisan option:set {key} {value}
Events
\Overtrue\LaravelOptions\Events\OptionCreated::class\Overtrue\LaravelOptions\Events\OptionUpdated::class\Overtrue\LaravelOptions\Events\OptionSaved::class\Overtrue\LaravelOptions\Events\OptionDeleted::class\Overtrue\LaravelOptions\Events\OptionRetrieved::class\Overtrue\LaravelOptions\Events\Event::class
Testing
$ composer test
❤️ Sponsor me
如果你喜欢我的项目并想支持它,点击这里 ❤️
Project supported by JetBrains
Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
PHP 扩展包开发
想知道如何从零开始构建 PHP 扩展包?
请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》
License
MIT
overtrue/laravel-options 适用场景与选型建议
overtrue/laravel-options 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18.56k 次下载、GitHub Stars 达 52, 最近一次更新时间为 2019 年 03 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Settings」 「overtrue」 「laravel-options」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 overtrue/laravel-options 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 overtrue/laravel-options 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 overtrue/laravel-options 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
List of 75 languages for Laravel.
Chinese to Pinyin translator.
Persistent settings package for Laravel framework.
A Zend Framework module to quickly and easily set PHP settings.
Settings Card for Laravel Nova.
List of 75 languages for Laravel 4, 5, 6 and 7
统计信息
- 总下载量: 18.56k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 52
- 点击次数: 23
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-27