PHPackages                             rnr/laravel-alice - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rnr/laravel-alice

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rnr/laravel-alice
=================

Wrapper of alice fixture generator for laravel

0.9.1(8y ago)73.4k3[1 issues](https://github.com/rodnover55/laravel-alice/issues)PHP

Since Oct 26Pushed 8y ago2 watchersCompare

[ Source](https://github.com/rodnover55/laravel-alice)[ Packagist](https://packagist.org/packages/rnr/laravel-alice)[ RSS](/packages/rnr-laravel-alice/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (14)Used By (0)

LaravelAlice
============

[](#laravelalice)

[![Package version](https://camo.githubusercontent.com/f58bb34d9cbc30cbde3469b7bd21a4c8496707d464a5f70226833d13fcea5995/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f726e722f6c61726176656c2d616c6963652e737667)](https://packagist.org/packages/rnr/laravel-alice)[![Build Status](https://camo.githubusercontent.com/646770c3677b6ee24d5132d08dd871af18f9118927c4903d37c711ba6c3e5c9c/68747470733a2f2f7472617669732d63692e6f72672f726f646e6f76657235352f6c61726176656c2d616c6963652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rodnover55/laravel-alice)

A [Laravel](https://laravel.com/) package to manage fixtures with [nelmio/alice](https://github.com/nelmio/alice).

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

[](#installation)

This is installable via [Composer](https://getcomposer.org/) as [rnr/laravel-alice](https://packagist.org/packages/rnr/laravel-alice)

```
composer install --dev rnr/laravel-alice

```

Basic usage
-----------

[](#basic-usage)

Create `yml` fixture file as it is described [nelmio/alice](https://github.com/nelmio/alice)

```
Nelmio\Entity\User:
    user{1..10}:
        username: ''
        fullname: ' '
        birthDate: ''
        email: ''
        favoriteNumber: '50%? '

Nelmio\Entity\Group:
    group1:
        name: Admins
        owner: '@user1'
        members: 'x @user*'
        created: ''
        updated: ''
```

Class `FixturelLoader` has one significant method [load](https://github.com/rodnover55/laravel-alice/blob/master/src/FixturesLoader.php#L39-L39) to load models. That method receive one or array of files with data to load. You can load this fixture to database with next code:

```
