LARAVEL FACADES – WRITE TESTABLE CODE
For one reason or another, Laravel Facades don’t get much love. I often read about how they are not a true facade implementation, and let me tell you, they’re not 🤷. They’re more like proxies than facades. If you think about it, they simply forward calls to their respective classes, effectively intercepting the request. When you start looking at them this way, you realize that facades, when used correctly, can result in a clean and testable code. So, don’t get too caught up in the naming, I mean who cares what they are called? And let’s see how we can make use of them.
Please read more on: https://blog.oussama-mater.tech/facades-write-testable-code/
Category
WRITE A COMMENT