定制 ofcold/nova-configurations-field 二次开发

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

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

ofcold/nova-configurations-field

最新稳定版本:1.0.1

Composer 安装命令:

composer require ofcold/nova-configurations-field

包简介

A Laravel Nova field.

README 文档

README

Dynamically create configuration items for your resources.

Requirements

Laravel Nova.

Installation

First install the Nova package via composer:

composer require ofcold/nova-configurations-field

Publish the config file:

php artisan vendor:publish --provider="Ofcold\\Configurations\\FieldServiceProvider"

Then run the migration

php artisan migrate

Usage

Add configuration item cache key in your .env File

OFCOLD_CONFIGURATION_KEY=config

Configure different resources

use Ofcold\Configurations\Configurations;

/**
 * Get the fields displayed by the resource.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return array
 */
public function fields(Request $request)
{
    return [
        ID::make()->sortable(),
        Configurations::make('Configurations')
            ->setConfigurations([
                Text::make('foo'),
                Text::make('bar')
            ], 'example')
    ];
}

Get configuration item from scope

use Ofcold\Configurations\Repository;

Repository::scopeItems($scope)

Get a single configuration

use Ofcold\Configurations\Repository;
// Use scope and key
// Example: example::foo
Repository::get('example::foo')

Get a single configuration value

use Ofcold\Configurations\Repository;
// Use scope and key
// Example: example::foo
Repository::getValue('example::foo')

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固