ekmungai/eloquent-ifrs

View on GitHub
database/factories/CategoryFactory.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

/**
 * @var \Illuminate\Database\Eloquent\Factory $factory
 */

use IFRS\Models\Category;
use Faker\Generator as Faker;

$factory->define(
    Category::class,
    function (Faker $faker) {
        return [
            'name' => $faker->word,
            'category_type' => $faker->randomElement(
                array_keys(config('ifrs')['accounts'])
            ),
        ];
    }
);