--- 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-43 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.