1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/create-helper-functions-for-creating-models-in-tests-using-factories.md
2021-08-16 20:48:37 +02:00

14 lines
432 B
Markdown

---
title: 'Create helper functions for creating models in tests using factories'
tweet_id: 1425833852480626694
thread_slug: pest-tips
author_username: archtechx
images:
- https://pbs.twimg.com/media/E8mO3a5VEAAsjr1.jpg
created_at: 2021-08-16T19:09:22+02:00
slug: create-helper-functions-for-creating-models-in-tests-using-factories
---
For example:
- invoice() to create an Invoice model
- product() to create a Product model