mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 21:34:03 +00:00
12 lines
No EOL
640 B
Markdown
12 lines
No EOL
640 B
Markdown
---
|
||
title: 'Create traits for relationships you commonly use in your models to make your codebase cleaner, simpler, and more consistent ✨'
|
||
tweet_id: '1454133823210459140'
|
||
thread_slug: weekly-thread-2021-44
|
||
author_username: jordankdalton
|
||
images:
|
||
- 'https://pbs.twimg.com/media/FCZiei8WYAA_mZQ.jpg'
|
||
- 'https://pbs.twimg.com/media/FCZiei7XIAEgVSm.jpg'
|
||
created_at: 2021-10-29T17:11:34+00:00
|
||
slug: create-traits-for-relationships-you-commonly-use-in-your-models-to-make-your-codebase-cleaner-simpler-and-more-consistent
|
||
---
|
||
Laravel Tip: Abstract relations you commonly use to a trait. It’s a DRY approach that keeps your models thin. |