twister3x/nova-translatable
Composer 安装命令:
composer require twister3x/nova-translatable
包简介
A Laravel Nova field for astrotomic/laravel-translatable.
README 文档
README
Laravel Nova Translatable
This Laravel Nova field allows you to manage translated fields with astrotomic/laravel-translatable.
Requirements
laravel/nova: ^2.9 || ^3.0 astrotomic/laravel-translatable: ^11.0 waynestate/nova-ckeditor4-field: ^0.6.0
Features
- Supports almost all Nova fields
- Supports default validation automatically
- Simple to implement with minimal code changes (after astrotomic/laravel-translatable support)
- Locale tabs to switch between different locale values of the same field
Supported fields
- Code
- Counted text (with max char and warning treshold)
- CKEditor
- Json
- Sluggable
- Text (also single line)
- Textarea
- Trix
Installation
Firstly, set up astrotomic/laravel-translatable.
Install the package in a Laravel Nova project via Composer:
# Install nova-translatable composer require rslanzi/nova-translatable # Publish configuration (optional, but useful for setting default locales) php artisan vendor:publish --tag="nova-translatable-config"
Usage
Text Field
Single line text field
NovaTranslatable::make('Title') ->singleLine()
Textarea Field:
Multi line text field
NovaTranslatable::make('Text') ->hideFromIndex()
Counted Text Field:
Text field with chars counter
NovaTranslatable::make('Title') ->singleLine() ->counted()
Counted with max chars threshold.
Exceeded the threshold, the counter turns red.
NovaTranslatable::make('Title') ->singleLine() ->counted() ->maxChars(60) ->warningAt(50),
Counted with max chars and warning thresholds.
Exceeded the warning threshold, the counter turns orange, exceeded the max chars threshold, the counter turns red.
NovaTranslatable::make('Title') ->singleLine() ->counted() ->maxChars(60) ->warningAt(50),
CKEditor Field
CKEditor WYSIWYG editor. Usefull to manage HTML fields.
NovaTranslatable::make('Text') ->ckeditor()
Trix Field
Trix field
NovaTranslatable::make('Text') ->trix()
Sluggable Field
Automatically populate a slug field based on another field. Title in this case.
NovaTranslatable::make('Title') ->sluggable('Slug'), NovaTranslatableSlug::make('Slug') ->hideFromIndex(),
Code Field
Code field. Use a syntax highlighted text area.
NovaTranslatable::make('Text') ->code()
Code Field with custom language
Code field. Use a syntax highlighted text area.
NovaTranslatable::make('Text') ->code() ->language('php')
The Code field's currently supported languages are: dockerfile, javascript, markdown, nginx, php, ruby, sass, shell, vue, xml, yaml
Json Field
NovaTranslatable::make('Text') ->json()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Support the development
Do you like this project? Support it by donating
- PayPal: Donate
Security Vulnerabilities
If you discover a security vulnerability within Nova Translatable, please send an e-mail to Riccardo Slanzi at rslanzi@gmail.com. All security vulnerabilities will be promptly addressed.
License
Nova Translatable is free software distributed under the terme of the MIT license.
twister3x/nova-translatable 适用场景与选型建议
twister3x/nova-translatable 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 145 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 03 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「translatable」 「CKEditor」 「nova」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 twister3x/nova-translatable 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 twister3x/nova-translatable 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 twister3x/nova-translatable 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova card that shows you your system information.
A Laravel Nova card.
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
A Laravel Eloquent model trait for translatable resource
An Astrotomic Translatable extension for Laravel Nova.
A Laravel Nova package for publishable fields
统计信息
- 总下载量: 145
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-31