What is the difference between these two options on a select filter?
I've seen this done both ways but unsure which to use?
vs
Solution:Jump to solution
🤷♂️ nothing
you dont need
->all()
at all
all
if you have some operations on the collection like filtering or additions etc...4 Replies
Solution
🤷♂️ nothing
you dont need
->all()
at all
all
if you have some operations on the collection like filtering or additions etcWhat about the closure vs no closure? Same thing?
if you need to inject some dependencies use closure
Gotcha, thanks.