64robots/nova-row 问题修复 & 功能扩展

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

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

64robots/nova-row

最新稳定版本:1.0.7

Composer 安装命令:

composer require 64robots/nova-row

包简介

A Laravel Nova row field.

README 文档

README

This field has been merged to Custom Nova Fields package. Keep track of it for updates!

Row Field for Laravel Nova

This field allows you to create horizontal rows passing a collection of Custom Nova Fields.

Demo

Demo

Install

Run this command in your nova project: composer require 64robots/nova-fields

Add it to your Nova Resource:

Create a new Row field passing an array of Nova Fields as a second param. Attribute name can be passed as third param.

As we are using R64 Nova Fields. We can customize the classes and hide the field labels.

use R64\NovaFields\Row;

Row::make('Lines', [
      Number::make('Quantity')
        ->fieldClasses('w-full px-8 py-6')
        ->hideLabelInForms(),
      Text::make('Product')
        ->fieldClasses('w-full px-8 py-6')
        ->hideLabelInForms(),
      Number::make('Price')
        ->fieldClasses('w-full px-8 py-6')
        ->hideLabelInForms(),
    ])->fieldClasses('w-full px-8 py-6')
      ->labelClasses('w-1/2 px-8 py-6'),

This converts to an array of objects.

[
  { quantity: 1, product: 'This One', price: 20 },
  { quantity: 2, product: 'That One', price: 21 }
];

Localization

Set your translations in the corresponding xx.json file located in /resources/lang/vendor/nova

...

  "Add Row": "Añadir Fila",
  "Delete Row": "Eliminar Fila",
  "Are you sure you want to delete this row?": "¿Estás seguro de querer eliminar esta fila?"

统计信息

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

GitHub 信息

  • Stars: 14
  • Watchers: 3
  • Forks: 2
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-10