mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 21:34:03 +00:00
11 lines
No EOL
574 B
Markdown
11 lines
No EOL
574 B
Markdown
---
|
|
title: 'Use the ''afterMaking'' or ''afterCreating'' hooks in factories to execute additional logic'
|
|
tweet_id: '1466810192801120259'
|
|
thread_slug: weekly-thread-2021-48
|
|
author_username: mattkingshott
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FFXsvEtXsAIrx_I.jpg'
|
|
created_at: 2021-12-03T16:42:56+00:00
|
|
slug: use-the-aftermaking-or-aftercreating-hooks-in-factories-to-execute-additional-logic
|
|
---
|
|
💡#Laravel Tip: Database model factories have handy 'afterMaking' and 'afterCreating' callback methods that you can use to perform additional tasks on newly-created objects. |