定制 vsmov/settings 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vsmov/settings

Composer 安装命令:

composer require vsmov/settings

包简介

Application settings interface for Laravel 5 using Backpack CRUD.

README 文档

README

# Backpack\Settings [![Latest Version on Packagist][ico-version]][link-packagist] [![Software License][ico-license]](LICENSE.md) [![Build Status][ico-travis]][link-travis] [![Coverage Status][ico-scrutinizer]][link-scrutinizer] [![Quality Score][ico-code-quality]][link-code-quality] [![Style CI](https://styleci.io/repos/53683729/shield)](https://styleci.io/repos/53683729) [![Total Downloads][ico-downloads]][link-downloads] An interface for the administrator to easily change application settings. Uses Laravel Backpack. Works on Laravel 5.2 to Laravel 8. > ### Security updates and breaking changes > Please **[subscribe to the Backpack Newsletter](http://backpackforlaravel.com/newsletter)** so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months. ## Install **Note:** The default table name is `settings`, if you need to change it please carefully read the comments in the instruction below. In your terminal: ``` bash # install the package composer require backpack/settings # [optional] if you need to change table name or migration name, please do it now before proceding php artisan vendor:publish --provider="Backpack\Settings\SettingsServiceProvider" --tag="config" # then change the values you need in in `config/backpack/settings.php` # publish & run the migration php artisan vendor:publish --provider="Backpack\Settings\SettingsServiceProvider" php artisan migrate # [optional] add a menu item for it to the sidebar_content file php artisan backpack:add-sidebar-content "
  • Settings
  • " # [optional] insert some example dummy data to the database php artisan db:seed --class="Backpack\Settings\database\seeds\SettingsTableSeeder" ``` ## Usage ### End user Add it to the menu or access it by its route: **application/admin/setting** ### Programmer Use it like you would any config value in a virtual settings.php file. Except the values are stored in the database and fetched on boot, instead of being stored in a file. ``` php Setting::get('contact_email') // or Config::get('settings.contact_email') ``` ### Add new settings Settings are stored in the database in the "settings" table. Its columns are: - id (ex: 1) - key (ex: contact_email) - name (ex: Contact form email address) - description (ex: The email address that all emails go to.) - value (ex: admin@laravelbackpack.com) - field (Backpack CRUD field configuration in JSON format. https://backpackforlaravel.com/docs/crud-fields#default-field-types) - active (1 or 0) - created_at - updated_at There is no interface available to add new settings. They are added by the developer directly in the database, since the Backpack CRUD field configuration is a bit complicated. See the field types and their configuration code on https://backpackforlaravel.com/docs ### Override existing configurations You can use this addon to make various Laravel configurations adjustable through the settings GUI, including Backpack settings themself. For example, you can override the Backpack `show_powered_by` or the `skin` setting in `/config/Backpack/base.php`. 1. Create the setting entry in your settings database. You can add the settings manually, or via [Laravel seeders](https://laravel.com/docs/seeding). The values inserted into the database should be look similar to below: For Backpack `show_powered_by` setting: | Field | Value | | --- | --- | | key | show_powered_by | | name | Showed Powered By | | description | Whether to show the powered by Backpack on the bottom right corner or not. | | value | 1 | | field | {"name":"value","label":"Value","type":"checkbox"} | | active | 1 | For Backpack `Skin` setting: | Field | Value | | --- | --- | | key | skin | | name | Skin | | description | Backpack admin panel skin settings. | | value | skin-purple | | field | {"name":"value","label":"Value","type":"select2_from_array","options":{"skin-black":"Black","skin-blue":"Blue", "skin-purple":"Purple","skin-red":"Red","skin-yellow":"Yellow","skin-green":"Green","skin-blue-light":"Blue light", "skin-black-light":"Black light","skin-purple-light":"Purple light","skin-green-light":"Green light","skin-red-light":"Red light", "skin-yellow-light":"Yellow light"},"allows_null":false,"default":"skin-purple"} | | active | 1 | 2. Open up the `app/Providers/AppServiceProvider` file, and add the below lines: ```diff overrideConfigValues(); } /** * Register any application services. * * @return void */ public function register() { // } + protected function overrideConfigValues() + { + $config = []; + if (config('settings.skin')) + $config['backpack.base.skin'] = config('settings.skin'); + if (config('settings.show_powered_by')) + $config['backpack.base.show_powered_by'] = config('settings.show_powered_by') == '1'; + config($config); + } } ``` ## Screenshots See [backpackforlaravel.com](https://backpackforlaravel.com) - List view: ![List / table view in Backpack/Settings](https://user-images.githubusercontent.com/1032474/111115626-8f7a0480-856d-11eb-99bb-3004ec621ebb.gif) - Editing a setting with the email field type: ## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test ``` ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. ## Overwriting Functionality If you need to modify how this works in a project: - create a ```routes/backpack/settings.php``` file; the package will see that, and load _your_ routes file, instead of the one in the package; - create controllers/models that extend the ones in the package, and use those in your new routes file; - modify anything you'd like in the new controllers/models; ## Security If you discover any security related issues, please email tabacitu@backpackforlaravel.com instead of using the issue tracker. Please **[subscribe to the Backpack Newsletter](http://backpackforlaravel.com/newsletter)** so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months. ## Credits - [Cristian Tabacitu][link-author] - [All Contributors][link-contributors] ## License Backpack is free for non-commercial use and 69 EUR/project for commercial use. Please see [License File](LICENSE.md) and [backpackforlaravel.com](https://backpackforlaravel.com/pricing) for more information. ## Hire us We've spend more than 50.000 hours creating, polishing and maintaining administration panels on Laravel. We've developed e-Commerce, e-Learning, ERPs, social networks, payment gateways and much more. We've worked on admin panels _so much_, that we've created one of the most popular software in its niche - just from making public what was repetitive in our projects. If you are looking for a developer/team to help you build an admin panel on Laravel, look no further. You'll have a difficult time finding someone with more experience & enthusiasm for this. This is _what we do_. [Contact us](https://backpackforlaravel.com/need-freelancer-or-development-team). Let's see if we can work together. [ico-version]: https://img.shields.io/packagist/v/backpack/settings.svg?style=flat-square [ico-license]: https://img.shields.io/badge/license-dual-blue?style=flat-square [ico-travis]: https://img.shields.io/travis/laravel-backpack/settings/master.svg?style=flat-square [ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/laravel-backpack/settings.svg?style=flat-square [ico-code-quality]: https://img.shields.io/scrutinizer/g/laravel-backpack/settings.svg?style=flat-square [ico-downloads]: https://img.shields.io/packagist/dt/backpack/settings.svg?style=flat-square [link-packagist]: https://packagist.org/packages/backpack/settings [link-travis]: https://travis-ci.org/laravel-backpack/settings [link-scrutinizer]: https://scrutinizer-ci.com/g/laravel-backpack/settings/code-structure [link-code-quality]: https://scrutinizer-ci.com/g/laravel-backpack/settings [link-downloads]: https://packagist.org/packages/backpack/settings [link-author]: http://tabacitu.ro [link-contributors]: ../../contributors # Settings-main

    vsmov/settings 适用场景与选型建议

    vsmov/settings 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

    它主要适用于以下技术方向: 「dick」 「tabacitu」 「dick settings」 「updivision」 「manage settings」 「settings admin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

    我们在过去多个企业项目中使用过 vsmov/settings 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

    围绕 vsmov/settings 我们能提供哪些服务?
    定制开发 / 二次开发

    基于 vsmov/settings 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

    BUG 修复 & 性能优化

    线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

    项目外包 & 长期维护

    承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

    yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

    统计信息

    • 总下载量: 13
    • 月度下载量: 0
    • 日度下载量: 0
    • 收藏数: 0
    • 点击次数: 34
    • 依赖项目数: 1
    • 推荐数: 0

    GitHub 信息

    • Stars: 0
    • Watchers: 0
    • Forks: 0
    • 开发语言: PHP

    其他信息

    • 授权协议: proprietary
    • 更新时间: 2026-04-15