linuxstreet/laravel-registry
Composer 安装命令:
composer require linuxstreet/laravel-registry
包简介
Registry package provides a convenient way to manage and use simple key/value pairs (with pre-defined types) by using Laravel's under-laying config() functionality.
README 文档
README
Registry package provides a convenient way to manage and use simple key/value pairs (with pre-defined types) by using Laravel's under-laying config() functionality.
When application boots, registry entries are saved into Laravel's config so no registry calls will hit the database beyond that point.
The main difference is that keys/values are saved in database and there is no need to manually edit config files.
Take a look at contributing.md to see a to do list.
Installation
Requires:
Via Composer:
$ composer require linuxstreet/laravel-registry
Migrate your database:
$ php artisan migrate
If you're using Laravel 5.5 you'll need to add the service provider to your config/app.php
'Linuxstreet\Registry\RegistryServiceProvider::class'
Configuration
You can publish config and view files using the artisan command:
$ php artisan vendor:publish --provider="Linuxstreet\Registry\RegistryServiceProvider"
Usage
Check the 'config/registry.php' config file and make necessary changes if needed.
You can add/edit registry entries by using web provided web forms.
Start your web server:
$ php artisan serve
Go to: http://127.0.0.1:8000/admin/registry
Note: You can customize admin path by changing 'route_prefix' and/or 'path' options in 'config/registry.php'
Console helpers
- List registry key/values as stored in database:
$ php artisan registry:list
- List registry config keys with their real php values:
$ php artisan registry:config
- Flush all registry items (will permanently delete registry entries from database):
$ php artisan registry:flush
Using registry items in your code
You can access registry entries by using provided registry() helper:
registry('key', 'default');
or using Registry facade:
Registry::get('key', 'default');
or using Laravel config() helper:
config('registry.key', 'default');
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ phpunit
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
- Igor Jovanovic
License
Please see the license file for more information.
linuxstreet/laravel-registry 适用场景与选型建议
linuxstreet/laravel-registry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 10 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「registry」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 linuxstreet/laravel-registry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 linuxstreet/laravel-registry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 linuxstreet/laravel-registry 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Link Registry bundle for Contao Open Source CMS
Registry service.
Zend Framework 1 Registry package
Registry Component provides a fluent, object-oriented interface for storing data globally in a well managed fashion, helping to prevent global meltdown.
Laravel registry manager for application configurations
Company registry
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-24