承接 sinclairt/settingable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

sinclairt/settingable

Composer 安装命令:

composer require sinclairt/settingable

包简介

Store settings for an app or resource in the database

README 文档

README

Installation

  • Run composer require sinclairt/settable.
  • Register Sinclair\Settable\SettableServiceProvider::class in config\app.php inside the providers array.
  • Run composer dump-autoload
  • Run php artisan vendor:publish. This wil publish the migration for the settings.
  • Run php artisan migrate

Usage

Settings can be global or resource specific, for global settings, the $myObject in the examples below can be omitted or set to null, otherwise include the object whose setting you need.

Get

Shorthand: setting('some_key') will return the 'some_key' value. This will only return global settings, use the alternative method for resource settings

Alternative: app('Settable')->get('some_key', $myObject, 'my_default') or setting()->get(...)

It will check whether the value is a callback and return the value of the callback.

Set

Shorthand: setting(['some_key', 'some_value', $myObject]) will set the 'some_key' key to 'some_value' and return boolean.

Alternative: app('Settable')->set('some_key', 'my_value', $myObject) or setting()->set(...)

Exists

app('Settable')->exists('some_key', $myObject) or setting()->exists(...)returns boolean

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固