doefom,
@doefom@mastodon.social avatar

Using the "Higher Order Messages" of 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,
@michael@thms.uk avatar

@doefom I don’t like 3. It requires significant mental overhead for me.

My favourite is 2 by a very large margin.

michael,
@michael@thms.uk avatar

@doefom actually I think in this particular instance my favourite would be option 4:

User::where('is_published',1)->get()

😜

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Laravel
  • rosin
  • thenastyranch
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • cisconetworking
  • slotface
  • vwfavf
  • everett
  • Durango
  • kavyap
  • GTA5RPClips
  • megavids
  • khanakhh
  • osvaldo12
  • ngwrru68w68
  • normalnudes
  • anitta
  • ethstaker
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • tester
  • JUstTest
  • All magazines