digitalion/laravel-simple-user-settings 问题修复 & 功能扩展

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

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

digitalion/laravel-simple-user-settings

最新稳定版本:1.0.0

Composer 安装命令:

composer require digitalion/laravel-simple-user-settings

包简介

A simple method for managing user settings

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a simple way to manage user settings. The settings will be based on the configuration file and then stored within a json field in the users table.

Installation

You can install the package via composer:

composer require digitalion/laravel-simple-user-settings

Once installed you can publish the configuration file with:

php artisan vendor:publish --tag="laravel-simple-user-settings-config"

The configuration file will be empty, but you can fill it with any settings your app offers.

Right after that you will need to add the settings field to the users table.

php artisan migrate

Optionally, you can publish the migration to make any changes with:

php artisan vendor:publish --tag="laravel-simple-user-settings-migrations"

Usage

The package will offer you the settings helper with which you can directly access user settings.

Read all settings

With the settings() command you will get the array of all settings. If the user has no saved settings, all the basic values will be returned.

Reading a value

To read a given settings value you will have to use the settings('key') command. To get a nested value, use the dot as a separator. For example: settings('key1.key2.key3').

Set a value

The values can be set with the command: settings('key', 'value')

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固