Laravel 9.18, weekly updates, and 🔥 tip

Laravel 9.18

With no release last week, there's a lot today in Laravel 9.18. Here are some highlights with a shoutout to Tim MacDonald (aka TimMac) for crushing it.

  • Improve file attachment for mail and notifications in #42563
  • Introduce invokable validation classes in #42689
  • Add @readonly Blade directive in #42717
  • Add nested array syntax for with relations in #42690
  • Add backoff in broadcast events in #42737
  • Add host(), httpHost(), schemeAndHttpHost() to Request in #42797
  • Add @pushIf Blade directive in #42762
  • Allow removing token during tests in #42841
  • Allow for nullable morphs in whereNotMorphedTo in #42878
  • Introduce fake() helper which resolves Faker singleton in #42844

You may review the full branch diff on GitHub for a complete list of changes.

This version bump and update is automated for subscribers to a Shifty Plan. If you don't have one of those, be sure to bump your constraint and run composer update to get the latest features.

Weekly Journal

Last week Jess and I finalized the v1.0 release of the Workbench desktop app. I'll probably soft launch it over the weekend and promote it early next week.

I also live streamed Wednesday refactoring some old tests for Stripe webhooks and events. I'll do another related live stream tomorrow.

Lastly, I finished up the outstanding Human Shifts, as well as made more tweaks to their automation.

This week I'll continue to make more tweaks to any areas I felt could be more automated. I'll also probably start to work on some new Workbench tasks.

🔥 Tip

Last week I tweeted about my preference for giving invokable controllers action oriented names, versus the traditional object + Controller names.

One of the replies suggested using "actions". Actions have popped up a few time within the Laravel community over the last several months. The purpose of these objects is to encapsulate potentially common code. Often code within a controller action.

I haven't adopted these objects personally. I find the existing objects within Laravel to be a "good enough" place to encapsulate much of this logic. Furthermore, these "action" objects remind me too much of the "command" objects from Laravel 4. 🙃