aiman/thaana-latin-field

Laravel Nova 字段。

v1.0.0 2020-06-16 16:31 UTC

This package is auto-updated.

Last update: 2024-09-29 05:55:41 UTC


README

此 Nova 包允许您使用 Nova 字段进行 thaana-latin 转换。请注意,此包仍在测试中。拉丁翻译可能不完美。

image

安装

composer require aiman/thaana-latin-field

用法

在您的 Nova 资源中添加 use 声明,并使用 Nova Latin 字段。为了使用此字段,您必须安装Thaana Text Field

use Aiman\ThaanaLatinField\ThaanaLatinField;

    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request)
    {
        return [
            ID::make()->sortable(),

            ThaanaTextField::make('Content', 'content')->convertToLatin('latin_content'),
            ThaanaLatinField::make('Latin Content', 'latin_content'),
        ];
    }

重要

此包已针对 nova 2.0+ 进行测试。最新测试版本为 nova v3.6.0

致谢

巨大的致谢要献给@Jawish Hameed,他为他的 thaana 翻译插件Thaana Keyboard做出了贡献。