innoge/filament-form-faker
Composer 安装命令:
composer require innoge/filament-form-faker
包简介
A package to generate fake input data for Filament forms.
README 文档
README
The Filament Form Faker is a utility package designed for generating fake input data in Filament v3 forms. It's ideal for streamlining the development of extensive forms and conducting thorough form testing.
Note
This package is not recommended for production use and should be limited to development and testing scenarios.
This package is currently in its Beta phase. Your participation in testing and feedback through issue reporting is highly appreciated.
Installation
You can install the package via composer:
composer require innoge/filament-form-faker --dev
Filament Panel Usage
To autofill forms with fake data in Filament Record Pages, use
the InnoGE\FilamentFormFaker\Traits\FillsFormWithFakeData trait. Below is an example for
the CreateUser of the UserResource page:
<?php namespace App\Filament\Resources\UserResource\Pages; use App\Filament\Resources\UserResource; use Filament\Resources\Pages\CreateRecord; use InnoGE\FilamentFormFaker\Traits\FillsFormWithFakeData; class CreateUser extends CreateRecord { use FillsFormWithFakeData; protected static string $resource = UserResource::class; }
By default, forms are filled with fake data only in local or testing environments. This behavior can be customized by
overriding the shouldFillFormWithFakeData method in your Page Component.
protected function shouldFillFormWithFakeData(): bool { // insert your custom logic here }
Standalone Usage
When you are using Filament/Formsoutside of the Panel Builder you can use the fake() method on your Form instance to
fill your form with fake data. We recommend using this method in your mount method.
public function mount() { $this->getForm('form')->fake(); // or $this->form->fake(); }
Supported Field Types
Currently, we support the following field types:
- Builder
- Checkbox
- CheckboxList
- KeyValue
- Option
- Repeater
- Select
- Textarea
- TextInput
If you want to add support for other field types please create an issue or a pull request.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
innoge/filament-form-faker 适用场景与选型建议
innoge/filament-form-faker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.5k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2023 年 12 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「innoge」 「filament-form-faker」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 innoge/filament-form-faker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 innoge/filament-form-faker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 innoge/filament-form-faker 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Mail driver for Microsoft Office 365 using the MSGraph API
This package helps prevent performance problems with frequent Policy calls within your application lifecycle.
A package for developing MCP Servers with Laravel.
Alfabank REST API integration
A Laravel package as streamlined solution to utilize the speculation rules api.
Laravel Mail driver for Microsoft Office 365 using the MSGraph API
统计信息
- 总下载量: 2.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-06