osi-open-source / warcott-laravel-forms
为 Laravel 框架的 Warcott 集成
1.0.3
2019-10-01 13:42 UTC
Requires
- php: >=7.1.0
- illuminate/support: >=5.5.0
- osi-open-source/warcott-client: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-29 05:09:06 UTC
README
它解析 Warcott 的 json 表单并显示表单。它使用 Warcott 客户端库 从服务器获取数据。此库仍在开发中,并非所有 Warcott 字段输入都受支持。表单预览的行为可能因纯 JavaScript 实现而有所不同。
安装
只需将以下行添加到您的 composer.json 中,然后运行安装/更新
"osi-open-source/warcott-laravel-form": "*"
配置
发布包配置文件以输入您的凭证
php artisan vendor:publish --tag=warcott --force
使用
这是在您的视图中显示表单布局的示例。
{{ warcottDisplay('domainKey') }}
有关 API 消费、数据映射和表单操作,您可以查看 Warcott 客户端的用法
开发者信息
如果您想显示所有不受支持的字段的错误,您可以更改 resources/views/fields/base.blade.php 中的行
@includeIf('warcott::fields.'.($field['type'] ?? 'text'))
为
@include('warcott::fields.'.($field['type'] ?? 'text'))