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/you-can-refactor-cluttered-if-conditions-using-lookup-tables-match-statements-and-switch-statements.md
2022-01-07 18:35:45 +01:00

15 lines
593 B
Markdown

---
title: 'You can refactor cluttered if () conditions using lookup tables, match statements, and switch statements'
tweet_id: '1471864664661311488'
thread_slug: weekly-thread-2021-50
author_username: archtechx
images:
- 'https://pbs.twimg.com/media/FGVrAKdVgAIWfwk.jpg'
created_at: 2021-12-17T15:27:36+00:00
slug: you-can-refactor-cluttered-if-conditions-using-lookup-tables-match-statements-and-switch-statements
---
🔥 Three ways you can refactor cluttered if () conditions
First: lookup tables 👇
These are great for refactoring complex conditions with lots of else if () cases