(This is part of an open ended series of posts where I write down random things I feel are sharable from the years of mailing lists I’ve not caught up on…)

You have to work hard to be in the Laravel space and not know about Freek Van der Herten – he of Spatie. Looks like the mailbox has 85 entries of his bi-weekly mailing list going back to March 2020. (Yes, that math doesn’t math – there are holes. No idea why but I assume they fall into ‘broken filters’ or ‘missing filters’.)

Per usual, all the links are dead because he uses a link shortener….

Anyhow, here are his highlight links from 2020 editions that I liked. Per usual, I’m ignoring the community submitted ones – if they weren’t good enough for his filter to highlight… Clearly going to be a multi-part one.

  • Writing readable PHP: decrease indentation by returning early – I too am a fan of the ‘return early’ pattern
  • On using arrow functions in PHP 7.4 – Yes, yes. We’re on L12 now. I’m trying to force myself to use new[-ish] syntax. EiPS is kinda an upgrade / reclaimation project at this point. And bonus points for PhpStorm tip.
  • Native image lazy-loading for the web! – cool piece of web standards. Nothing I am doing right now is going to be image heavy, but useful to know about should I need to reach for it.
  • Testing without mocking frameworks. – I’m not going to lie and say that I’m writing tests right now. I’m pressing save in one window and interacting with it in another. But I’ll come back to tests. Mocking boundaries I’ve always struggled with. (Doesn’t help with some of the packages I use say its just easier to hit the service test endpoint … which breaks my Airplane Principle of development.)
  • Blade Icons – I’m using Font Awesome right now, but if they want me to pay, well, this is an option to replace things. I’m really enjoying working with Blade. Blade + Livewire just works for my brain and feels like cheat mode.
  • The Beauty of Single Action Controllers – This current refactor will keep Resource Controllers (because it is how my brain works) but throwing this here as a possible future refactor
  • Avoiding inheritance in Laravel – best part of this [good] article is the principle of ‘grok the framework’. A bunch of my AI concerns get layered into that princple.
  • How to Patch a Package in Vendor, Yet Allow its Updates – Okay, this is magic. Now, a lot of my forked repos are because they are abandoned and just needed a dependency bump, which is another refactor I need to do… but this is cool.
  • HTML Forms: How (and Why) to Prevent Double Form Submissions – I’m rebuilding forms (to use Blade+Livewire rather than Vue) so this is timely. Even if I don’t do it now as ‘prevent double submissions’ is not MVP. More like MVP++.
  • Splitting a large Laravel Livewire Component – hopefully my Livewire stuff doesn’t get this large, but if it does, it is good to know this exists.
  • One Checkbox vs Two Radio Buttons – As she says, ‘it depends’ – the trick is to think about your context so you end up with a ‘depends’ that matches your need.