You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-15Lines changed: 8 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -247,7 +247,7 @@ How does it work? Just, create a factory for your entities and a seeds script.
247
247
248
248
### 1. Create a factory for your entity
249
249
250
-
For all the entities we want to seed we need to define a factory. To do so we give you awesome the [faker](https://github.com/marak/Faker.js/) library. The create a new "fake" entity and return it. Those file should be in the `src/database/factories` folder and suffixed with `Factory`. Example `src/database/factories/UserFactory.ts`.
250
+
For all the entities we want to seed, we need to define a factory. To do so we give you the awesome [faker](https://github.com/marak/Faker.js/) library as a parameter into your factory. Then create your "fake" entity as you would normally do and return it. Those factory files should be in the `src/database/factories` folder and suffixed with `Factory`. Example `src/database/factories/UserFactory.ts`.
251
251
252
252
```typescript
253
253
factory.define(User, (faker:typeofFaker) => {
@@ -293,25 +293,18 @@ export class CreateUsers implements SeedsInterface {
293
293
}
294
294
```
295
295
296
-
Another example for nested entities. For that we use the each function to so.
0 commit comments