AdonisJs version 4.1.0
npm version: 6.5.0
Node.js version: 11.8.0
mysql version: 14.14
Schema file:
up () {
this.create('examples', (table) => {
table.increments()
table.string('foo', 30).notNullable()
table.string('bar', 30).notNullable()
})
}
factory.js:
Factory.blueprint('App/Models/Example', (faker) => {
return {
foo: faker.foo(),
bar: faker.bar()
}
})
Clone my repository: https://github.com/begueradj/bugs/tree/master/seed-bug
Hey @begueradj ! 馃憢
I don't know what you are trying to do.
The faker variable is a ChanceJS instance.
There's no foo nor bar method on it.
I have been navigating the source code of AdonisJS to see where such things come from because I felt something was wrong with faker.something(). That is totally new for me. I bookmark it. Thank you so much @RomainLanz This framework is really amazing and easy to learn. Even testing is so easy with it.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hey @begueradj ! 馃憢
I don't know what you are trying to do.
The
fakervariable is a ChanceJS instance.There's no
foonorbarmethod on it.