Skip to content

Generate fake type data for date types #261

@dehboris

Description

@dehboris
  • Laravel Version: ^7.0
  • PHP Version: 7.4.
  • Blueprint Version: ^1.13
  • Platform: Windows

Description:

When i use model data type like smallInteger or year, in factory the faker not generate all attributes.

draft.yaml:

models:
  File:
    month: smallInteger
    year: year
    path: string

FileFactory.php

$factory->define(File::class, function (Faker $faker) {
    return [
        'month' => $faker->,
        'year' => $faker->,
        'path' => $faker->word,
    ];
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions