定制 leromo/laravel-settings 二次开发

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

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

leromo/laravel-settings

最新稳定版本:v1.0.0

Composer 安装命令:

composer require leromo/laravel-settings

包简介

Leromo settings module for Laravel projects like SnippetCMS

README 文档

README

PHP Composer Latest Version on Packagist Total Downloads

This package allows you to save settings in DB & Cache. You can use helper function to get settings value anywhere in a Laravel project like SnippetCMS.

  • Database support
  • Helper function
  • Cache support

Getting Started

1. Install

Run the following command:

composer require leromo/laravel-settings

2. Publish

Publish config file.

php artisan vendor:publish --provider="Leromo\LaravelSettings\SettingsServiceProvider" --tag=settings-config

3. Preparing the database

You need to publish the migration to create the media table:

php artisan vendor:publish --provider="Leromo\LaravelSettings\SettingsServiceProvider" --tag=settings-migration

After that, you need to run migrations.

php artisan migrate

4. Configure

You can change the options of your app from config/laravel-settings.php file

Usage

Helper

setting()->get('promo');
setting()->get('promo', 'default');
setting()->put('promo', 'snippet');
setting()->delete('promo');

Facade

Setting::get('promo');
Setting::get('promo', 'default');
Setting::put('promo', 'snippet');
Setting::delete('promo');

Testing

./vendor/bin/phpunit

Changelog

Please see Releases for more information what has changed recently.

Contributing

Pull requests are more than welcome. You must follow the PSR coding standards.

Security

If you discover any security related issues, please email leromo.dev@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-15