--- title: 'Compare models using is() instead of directly comparing attributes' tweet_id: '1479467936700010504' thread_slug: weekly-thread-2022-01 author_username: archtechx images: - 'https://pbs.twimg.com/media/FHJNmt3VEAIYtCy.jpg' created_at: 2022-01-07T15:00:17+00:00 slug: compare-models-using-is-instead-of-directly-comparing-attributes --- 🔥 Tip: Compare models using ->is() instead of doing direct attribute value comparisons This is a simpler version of the tip below https://twitter.com/archtechx/status/1465334771349811219