ahmedabdelaal/filament-json-preview

以格式化方式预览 Json

v1.0.0 2024-05-30 08:52 UTC

This package is auto-updated.

Last update: 2024-09-03 22:19:31 UTC


README

此包无缝集成了强大的 JSONEditor 库,使开发者能够轻松地将强大的 JSON 编辑器集成到他们的 Filament 项目中。 https://github.com/josdejong/jsoneditor

安装

img.png

您可以通过 composer 安装此包

composer require ahmedabdelaal/filament-json-preview

发布 svg 图标

php artisan vendor:publish --tag=jsoneditor

使用方法

public static function infolist(Infolist $infolist): Infolist
{
        return $infolist->schema([
            JsonPreview::make('logs'),
        ]);
}

在 json 中启用搜索

JsonPreview::make('logs')->searchable()

在 json 中显示导航栏

JsonPreview::make('logs')->showNavigationBar()

贡献

欢迎您的贡献并高度重视!请随时提交拉取请求或创建问题。

致谢

许可证

MIT 许可证 (MIT)。请参阅 许可证文件 了解更多信息。

默认

Screenshot

搜索

Screenshot

导航栏

Screenshot