iammuttaqi / filament-fakester
A Filament plugin to generate fake data for your Laravel application.
Fund package maintenance!
Requires
- php: ^8.2
- filament/forms: ^5.6.5
- spatie/laravel-package-tools: ^1.93.1
Requires (Dev)
- larastan/larastan: ^3.9.6
- laravel/pint: ^1.29.1
- nunomaduro/collision: ^8.9.4
- orchestra/testbench: ^9.0|^10.0|^11.1
- pestphp/pest: ^3.7|^4.7
- pestphp/pest-plugin-arch: ^3.0|^4.0.2
- pestphp/pest-plugin-laravel: ^3.0|^4.1
- pestphp/pest-plugin-livewire: ^3.0|^4.1
- rector/rector: ^2.4.4
- spatie/laravel-ray: ^1.43.9
This package is auto-updated.
Last update: 2026-07-09 00:34:15 UTC
README
Filling out forms in dev is tedious. Filament Fakester sticks a little sparkles button next to every TextInput, Textarea, RichEditor, and MarkdownEditor — one click and the field gets sensible fake data. It reads the field name and the input type, so email gets an email, latitude gets a coordinate, slug gets a slug, phone gets a phone number, and so on. In production it's gone — nothing renders unless you tell it to.
Install
composer require iammuttaqi/filament-fakester --dev
That's it. The package self-registers through Laravel's service provider discovery, so the moment a Filament form component renders anywhere in your app — inside a panel, inside a standalone Livewire form, doesn't matter — the hint button is there. No plugin to wire into a panel, no service provider edits.
Want to publish the config?
php artisan vendor:publish --tag="filament-fakester-config"
return [ 'enabled' => env('FAKESTER_ENABLED', ! app()->isProduction()), ];
Hidden in production by default. Force it on or off with FAKESTER_ENABLED in your env.
What it figures out for you
The resolver looks at the field's name and HTML type and picks something that fits. A non-exhaustive taste:
| Field name / type | What you get |
|---|---|
email (or type="email") |
jane.doe@example.com |
phone, mobile, tel |
+1-555-… |
latitude / longitude |
valid coordinates |
slug |
kebab-case-words |
url, website, facebook, google_map |
a plausible URL |
password |
a random secret |
name, first_name, last_name, company, city, … |
what you'd expect |
| anything else | a short faker sentence |
Textarea, RichEditor, MarkdownEditor get longer paragraphs — HTML blocks for rich editors, plain markdown for the markdown one.
Teaching it your own fields
Got an invoice_number or order_ref that needs a specific shape? Register a matcher anywhere in your app boot (e.g. AppServiceProvider::boot):
app(\Iammuttaqi\FilamentFakester\Support\MatcherRegistry::class) ->register(fn (string $name, ?string $type) => $name === 'invoice_number' ? 'INV-' . fake()->numerify('######') : null );
Return a value to override the default, return null to fall through to the built-in resolver. Matchers run before the built-ins, so yours always win.
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.