PHPackages                             manageitwa/laravel-fixtures - 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. manageitwa/laravel-fixtures

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

manageitwa/laravel-fixtures
===========================

Loads fake data sets into Laravel for testing.

v1.4.0(8mo ago)0638MITPHPPHP 7.4.\*|^8.0

Since Jul 17Pushed 8mo agoCompare

[ Source](https://github.com/manageitwa/laravel-fixtures)[ Packagist](https://packagist.org/packages/manageitwa/laravel-fixtures)[ RSS](/packages/manageitwa-laravel-fixtures/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

 [![](https://avatars1.githubusercontent.com/u/33844443)](https://avatars1.githubusercontent.com/u/33844443)

Laravel Fixtures Package
========================

[](#laravel-fixtures-package)

Fixtures are used to load a "fake" set of data into a database that can then be used for testing or to help give you some interesting data while you're developing your application.

A fixture may depend on other fixtures, specified via its `CorpSoft\Fixture\Fixture::$depends` property. When a fixture is being loaded, the fixtures it depends on will be automatically loaded BEFORE the fixture; and when the fixture is being unloaded, the dependent fixtures will be unloaded AFTER the fixture.

[![Latest Stable Version](https://camo.githubusercontent.com/86561817a9c833961b3412492a663d39d4615384e9c1c167cd0242d4ceae7e0b/68747470733a2f2f706f7365722e707567782e6f72672f636f72702d736f66742f6c61726176656c2d66697874757265732f762f737461626c65)](https://packagist.org/packages/corp-soft/laravel-fixtures)[![Total Downloads](https://camo.githubusercontent.com/3ff7705ee5f47a37ce5aa85a17d94664cbf28de4820e544d046b78f175c34b6a/68747470733a2f2f706f7365722e707567782e6f72672f636f72702d736f66742f6c61726176656c2d66697874757265732f646f776e6c6f616473)](https://packagist.org/packages/corp-soft/laravel-fixtures)[![License](https://camo.githubusercontent.com/5f66de30bc0f5a6df18ff2dd492241c46085732a7fedf37d3497dbc1fa8cfd6c/68747470733a2f2f706f7365722e707567782e6f72672f636f72702d736f66742f6c61726176656c2d66697874757265732f6c6963656e7365)](https://packagist.org/packages/corp-soft/laravel-fixtures)[![Build Status](https://camo.githubusercontent.com/ac45e64264d93b244572d8d064efdd17098d38b4e61a6d79295d3f1b139a6b42/68747470733a2f2f7472617669732d63692e6f72672f436f72702d536f66742f6c61726176656c2d66697874757265732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Corp-Soft/laravel-fixtures)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d855499157e177e650c3f6d994d163ad798b2ac8e7a4e0adbf4f076ffdc6b60a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f72702d536f66742f6c61726176656c2d66697874757265732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Corp-Soft/laravel-fixtures/?branch=master)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist manageitwa/laravel-fixtures "*"

```

or add

```
"manageitwa/laravel-fixtures": "*"

```

to the require section of your `composer.json` file.

### Defining a Fixture

[](#defining-a-fixture)

To define a fixture, create a new class by extending `CorpSoft\Fixture\ActiveFixture`.

The following code defines a fixture about the `User` Illuminate\\Database\\Eloquent\\Model and the corresponding users table.

```
