PHPackages                             ergebnis/factory-muffin-definition - 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. ergebnis/factory-muffin-definition

AbandonedArchivedLibrary

ergebnis/factory-muffin-definition
==================================

Provides an interface for, and an easy way to find and register entity definitions for league/factory-muffin.

2.0.0(6y ago)26.5kMITPHPPHP ^7.2

Since Sep 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ergebnis/factory-muffin-definition)[ Packagist](https://packagist.org/packages/ergebnis/factory-muffin-definition)[ Docs](https://github.com/ergebnis/factory-muffin-definition)[ RSS](/packages/ergebnis-factory-muffin-definition/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (13)Versions (6)Used By (0)

factory-muffin-definition
=========================

[](#factory-muffin-definition)

[![Integrate](https://github.com/ergebnis/factory-muffin-definition/workflows/Integrate/badge.svg?branch=main)](https://github.com/ergebnis/factory-muffin-definition/actions)[![Prune](https://github.com/ergebnis/factory-muffin-definition/workflows/Prune/badge.svg?branch=main)](https://github.com/ergebnis/factory-muffin-definition/actions)[![Release](https://github.com/ergebnis/factory-muffin-definition/workflows/Release/badge.svg?branch=main)](https://github.com/ergebnis/factory-muffin-definition/actions)[![Renew](https://github.com/ergebnis/factory-muffin-definition/workflows/Renew/badge.svg?branch=main)](https://github.com/ergebnis/factory-muffin-definition/actions)

[![Code Coverage](https://camo.githubusercontent.com/19ba117a952ec1791c706eaab7d7b6a473992db028e4df0df52dd7e22111be52/68747470733a2f2f636f6465636f762e696f2f67682f65726765626e69732f666163746f72792d6d756666696e2d646566696e6974696f6e2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/ergebnis/factory-muffin-definition)[![Type Coverage](https://camo.githubusercontent.com/651d1449774e452ebee80f08a922e1f6c902f1f11b837031ceb58a42ef1b65fb/68747470733a2f2f73686570686572642e6465762f6769746875622f65726765626e69732f666163746f72792d6d756666696e2d646566696e6974696f6e2f636f7665726167652e737667)](https://shepherd.dev/github/ergebnis/factory-muffin-definition)

[![Latest Stable Version](https://camo.githubusercontent.com/ab032fc71a78dcfe426b06586c54401ebaa6550b7a782579f3a02257f8cbcd0a/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f666163746f72792d6d756666696e2d646566696e6974696f6e2f762f737461626c65)](https://packagist.org/packages/ergebnis/factory-muffin-definition)[![Total Downloads](https://camo.githubusercontent.com/1543c9f7979a4d99c25d4772d942b3633f5219114c68ac0edb02bca1d86db6ca/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f666163746f72792d6d756666696e2d646566696e6974696f6e2f646f776e6c6f616473)](https://packagist.org/packages/ergebnis/factory-muffin-definition)

Provides an interface for, and an easy way to find and register entity definitions for [`league/factory-muffin`](https://github.com/thephpleague/factory-muffin), inspired by [`ergebnis/factory-girl-definition`](https://github.com/ergebnis/factory-girl-definition).

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

[](#installation)

Run

```
$ composer require --dev ergebnis/factory-muffin-definition
```

Usage
-----

[](#usage)

### Create Definitions

[](#create-definitions)

Implement the `Definition` interface and use the instance of `League\FactoryMuffin\FactoryMuffin`that is passed in into `accept()` to define entities:

```
