定制 archerzdip/laravel-settings 二次开发

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

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

archerzdip/laravel-settings

Composer 安装命令:

composer require archerzdip/laravel-settings

包简介

Global key-value store in the database, like int string array json and so on.

README 文档

README

Global key-value store in the database

Installation

You can install the package via composer:

composer require archerzdip/laravel-settings

or

// composer.json
"archerzdip/laravel-settings":"dev-master"
// composer update
composer update

Publish, migrate

By running php artisan vendor:publish --provider="ArcherZdip\Setting\SettingsServiceProvider" in your project all files for this package will be published. For this package, it's only a migration. Run php artisan migrate to migrate the table. There will now be an options table in your database.

Usage

With the setting() helper, we can get and set settings:

// Get setting object
setting();

// Get setting value
setting('key','default');

// Set setting value
setting_set(string $key, $valve, $type = null, $description = null);

// Check the setting exists
setting_exists(string $key);

// Remove the setting value
setting_remove(string $key);

If you want to check if an setting exists, you can use the facade:

use Setting;
$check = Setting::exists('someKey');

Console

It is also possible to set setting within the console:

php artisan setting:set {someKey} {someValue}

And it is also possible to get setting within the console:

php artisan setting:get {someKey}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固