ardenthq/nova-enhanced-textarea 问题修复 & 功能扩展

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

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

ardenthq/nova-enhanced-textarea

最新稳定版本:1.0.2

Composer 安装命令:

composer require ardenthq/nova-enhanced-textarea

包简介

Custom textarea field with character count

README 文档

README

banner.jpeg

A custom Textarea Field for Nova with character count

Stable Version License PHP Version Require

Note this feature has been added to Nova's own TextArea component starting with Nova 4.16.0. Please make use of the built-in feature over this package.

Features

  • For Laravel Nova ^4.0
  • Character count and maxLength warning

screenshot-1.png screenshot-2.png

Installation

composer require ardenthq/nova-enhanced-textarea

Use

  1. Add the EnhancedTextarea field to your Nova Resource.

  2. Call the ->maxLength() method to define the max number of characters that the field should show.

<?php
namespace App\Nova;

use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Resource;
use Ardenthq\EnhancedTextarea\EnhancedTextarea;

final class ResourceName extends Resource
{
    // ....
    public function fields(NovaRequest $request)
    {
        return [
            // ....
            EnhancedTextarea::make('Description', 'description')
                ->rules('nullable', 'string', 'max:1000')
                ->hideFromIndex()
                ->maxLength(1000),
                // ...
        ];
    }
    // ...
}

Development

  1. Run yarn nova:install and yarn install to install all the necessary dependencies for compiling the view components.
  2. Run yarn run dev (or yarn run watch) while making changes to the components in your local environment.
  3. If you change the vue components, ensure to compile for production before making a PR.

Compile for production

  1. Run yarn nova:install and yarn install to install all the necessary dependencies for compiling the view components.
  2. Run yarn run production.

Analyze the code with phpstan

composer analyse

Refactor the code with php rector

composer refactor

Format the code with php-cs-fixer

composer format

Run tests

composer test

Security

If you discover a security vulnerability within this package, please send an e-mail to security@ardenthq.com. All security vulnerabilities will be promptly addressed.

Credits

This project exists thanks to all the people who contribute.

License

MIT © Ardent

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固