PHPackages                             joshbonnick/filament-faker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. joshbonnick/filament-faker

AbandonedArchivedLibrary[Testing &amp; Quality](/categories/testing)

joshbonnick/filament-faker
==========================

Generate fake blocks content for Filament forms, blocks and components.

v1.1.1(2y ago)296[1 PRs](https://github.com/joshbonnick/filament-faker/pulls)MITPHPPHP ^8.1

Since Aug 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/joshbonnick/filament-faker)[ Packagist](https://packagist.org/packages/joshbonnick/filament-faker)[ Docs](https://github.com/joshbonnick/filament-faker)[ RSS](/packages/joshbonnick-filament-faker/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (6)Dependencies (15)Versions (9)Used By (0)

Filament Faker
==============

[](#filament-faker)

Filament Testing Utility Library
--------------------------------

[](#filament-testing-utility-library)

[![Latest Version on Packagist](https://camo.githubusercontent.com/211503991b387aad2f3832ff700e61245fae30acd5fc45a113373713ebc6bcb1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f7368626f6e6e69636b2f66696c616d656e742d66616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/joshbonnick/filament-faker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7b3a851b96e62c06a48be28b30cced621f0c97c10ca83a1239acdb29d4130a04/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6f7368626f6e6e69636b2f66696c616d656e742d66616b65722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/joshbonnick/filament-faker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d79752159109b127628571e1d713f7eda68dd50e80bbd26bbf5f8000e8727019/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6f7368626f6e6e69636b2f66696c616d656e742d66616b65722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/joshbonnick/filament-faker/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/308c0d36561cd2040858634c635e3324a818d9de96348242dd268e760edb3a28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f7368626f6e6e69636b2f66696c616d656e742d66616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/joshbonnick/filament-faker)

Filament Faker is a utility library designed to streamline writing testing that use Filament resources, forms, blocks, and components content. This library assists in automatically generating mock data for your tests within the Filament ecosystem.

Features and Usage Highlights
-----------------------------

[](#features-and-usage-highlights)

- **Data Generation:** Automatically generate test data for Filament resources, forms, blocks, and components.
- **Factory Support:** Utilize factory definitions for precise and accurate data generation.
- **Mutations:** Modify specific component values to suit your testing scenarios.
- **Configurable:** Control the behavior of data generation using configuration options.
- **Seamless Integration:** Easily integrate the library into your Filament-based projects.

Contents
--------

[](#contents)

- [Filament Utility Library](#filament-utility-library)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Usage In Tests](#usage-in-tests)
    - [Faking Custom &amp; Plugin Components](#faking-custom--plugin-components)
    - [Mutating Generated Data](#mutating-generated-data)
    - [Generate Data Using Factory Definitions](#generate-data-using-factory-definitions)
        - [Selecting Definitions](#selecting-definitions)
- [IDE Support](#ide-support)
- [Changelog](#changelog)
- [Credits](#credits)
- [License](#license)

Requirements
------------

[](#requirements)

- [Filament](https://github.com/filamentphp/filament) v3 or higher.
- PHP 8.1 or higher.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require joshbonnick/filament-faker --dev
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-faker-config"
```

Usage
-----

[](#usage)

Call the `fake` method on a resource to retrieve an array of fields filled with fake data.

```
