PHPackages                             asvae/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. [Database &amp; ORM](/categories/database)
4. /
5. asvae/laravel-fixtures

ActiveLibrary[Database &amp; ORM](/categories/database)

asvae/laravel-fixtures
======================

0.1.2(9y ago)720MITPHPPHP &gt;=5.4.0

Since Jan 25Pushed 9y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (1)Versions (5)Used By (0)

Intention
---------

[](#intention)

When working with database, sometimes we need to modify schema, and sometimes data. Doing both things in laravel migrations is painful. This package gives simple means to keep two of them separately.

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

[](#installation)

Install via composer:

```
composer require asvae/laravel-fixtures

```

To your `App\Console\Kernel` add command like this:

```
protected $commands = [
    // ...

    \Asvae\LaravelFixtures\Commands\FixtureRun::class,
];
```

Usage
-----

[](#usage)

For your fixtures be sure to extend`\Asvae\LaravelFixtures\AbstractFixture` class or at least implement `Asvae\LaravelFixtures\FixtureContract`. Abstract class has several utility methods to keep you going:

```
$this->runFixture($className); // Runs another fixture.
$this->runArray($className); // Run [nested] array of fixtures

```

To run fixture do `php artisan fixture:run "\App\Fixtures\YourFixture"`. This will basically run `run` method in given class, while also resolving dependencies in case you defined any in constructor.

Config
------

[](#config)

No config file provided as the library is way too small. You can define default namespace in `.env` file though. This will be used when you pass class name without namespace

```
FIXTURES_NAMESPACE=App\MyFixtures

```

Examples
--------

[](#examples)

Take a look at [several examples](src/Examples). For the case depicted, in production, to fully migrate data you will run

```
php artisan fixture:run "\Asvae\LaravelFixtures\Examples\FixtureSet"

```

In development, to refresh single table you will run solitary fixtures as these are much faster.

Hints
-----

[](#hints)

- You can copy namespaced class name in PHPStorm by placing cursor onto class name and pressing `Ctrl (⌘) + Shift + Alt + C`
- If you want to add some functionality, feel free to just copy package in your project. Several classes won't hurt.
- Spread a word or leave a star if what I did was helpful for you.

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

3440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8844ab5e266850d883c5fe49083dc2889d282ce9c8d813407866fb3ba9a94335?d=identicon)[asvae](/maintainers/asvae)

---

Top Contributors

[![asvae](https://avatars.githubusercontent.com/u/5394573?v=4)](https://github.com/asvae "asvae (8 commits)")

---

Tags

laraveldatabasemigrations

### Embed Badge

![Health badge](/badges/asvae-laravel-fixtures/health.svg)

```
[![Health](https://phpackages.com/badges/asvae-laravel-fixtures/health.svg)](https://phpackages.com/packages/asvae-laravel-fixtures)
```

###  Alternatives

[dragon-code/laravel-deploy-operations

Performing any actions during the deployment process

244207.7k2](/packages/dragon-code-laravel-deploy-operations)[nunomaduro/laravel-optimize-database

Publishes migrations that make your database production ready.

26441.3k](/packages/nunomaduro-laravel-optimize-database)[waad/laravel-model-metadata

A robust Laravel package for handling metadata with JSON casting, custom relation names, and advanced querying capabilities.

854.1k](/packages/waad-laravel-model-metadata)[orptech/laravel-migration-partition

Laravel extensions that extends Illuminate to enable partitioned table creation within Laravel migrations.

3628.3k](/packages/orptech-laravel-migration-partition)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

111.6k](/packages/ramadan-easy-model)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
