laravel-daddy/swift-settings 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

laravel-daddy/swift-settings

最新稳定版本:4.0

Composer 安装命令:

composer require laravel-daddy/swift-settings

包简介

easy way to manage and cache settings in laravel app

README 文档

README

Crafted with ♥️ by Laravel Daddy

Installation

To install the package, run the following command:

composer require laravel-daddy/swift-settings

Upon installation, the package will automatically publish the necessary migrations and register the SwiftSettingsServiceProvider.

Usage

All settings are automatically cached to enhance the performance of your application. This ensures that accessing settings is efficient and optimized.

You can manage settings using either the facade or the helper method.

Using the Facade

use LaravelDaddy\SwiftSettings\Facade\SwiftSettingsFacade;

// Retrieve a setting by its key, with a default value if the key doesn't exist
SwiftSettingsFacade::getSetting('key', 'default_value');

// Set a new value for a specific key
SwiftSettingsFacade::setSetting('key', 'value');

Using the Helper Method

// Retrieve a setting by its key, with a default value if the key doesn't exist
swift_settings()->getSetting('key', 'default_value');

// Set a new value for a specific key
swift_settings()->setSetting('key', 'value');

Both approaches allow you to retrieve or update settings efficiently, with all keys being cached for improved performance.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固