定制 marshmallow/nova-charcounted-fields 二次开发

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

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

marshmallow/nova-charcounted-fields

最新稳定版本:v2.1.0

Composer 安装命令:

composer require marshmallow/nova-charcounted-fields

包简介

Text and textarea fields with a character counter.

README 文档

README

Text and textarea fields with a character counter for Laravel Nova.

Installation

You can require this package using composer:

composer require marshmallow/nova-charcounted-fields

Usage

You can add the field with a resolver as follows:

use Marshmallow\CharcountedFields\TextCounted;
use Marshmallow\CharcountedFields\TextareaCounted;

TextCounted::make('Meta title')

Image of character counter

You can use the text and textarea fields with charactercounters on you Nova model. The max number of characters aren't enforced, but just encouraged with warning colors and the counter. (You could enforce the max number of characters with Nova's built in rules).

TextCounted::make('Meta title')
	->minChars(30)
    ->maxChars(60)
    ->warningAt(50),

TextareaCounted::make('Meta description')
	->minChars(70)
    ->maxChars(160)
    ->warningAt(150),

The maxChars and warningAt are both optional. The color of the counter will change when the max or warningAt limit is reached. Image of character counter with indication

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 1
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-06