Hey Laravel Developers
Did you know that when adding where conditionals in the Query Builder, you can use dynamic method names?
For example, if you want to fetch an order matching a particular quantity, you can call a dynamic method like whereQuantity($quantity) instead of using where('quantity', $quantity).
It just reads so much better! What do you think?
Back
•
I personally avoid using the dynamic/magic/fluent methods. I cannot remember my reasoning 😂
•
In response to @twestrick
Yeah it depends on choice and what you prefer!