doefom, 24 days ago Using the "Higher Order Messages" of #Laravel can save you some code. The following examples all filter for published posts in three different ways. I'm not yet sure which way I like the most. Probably (2) and (3).
Using the "Higher Order Messages" of #Laravel can save you some code. The following examples all filter for published posts in three different ways. I'm not yet sure which way I like the most. Probably (2) and (3).
michael, 24 days ago @doefom I don’t like 3. It requires significant mental overhead for me. My favourite is 2 by a very large margin.
@doefom I don’t like 3. It requires significant mental overhead for me.
My favourite is 2 by a very large margin.
michael, 24 days ago @doefom actually I think in this particular instance my favourite would be option 4: User::where('is_published',1)->get() 😜
@doefom actually I think in this particular instance my favourite would be option 4:
User::where('is_published',1)->get()
😜
Add comment