Ash Allen
banner
ashallendesign.co.uk
Ash Allen
@ashallendesign.co.uk
⚡ You can use the "once" helper to memoise data in Laravel!

The result of the closure will be stored on the first call. Then all future calls will return the stored result.

When used in the right places, this can lead to some nice performance gains.
January 16, 2026 at 4:11 PM
🔥 If you're using job batches in Laravel, the "job_batches" database table can grow quite quickly.

To solve this, you can schedule the "queue:prune-batches" command.

I've just added this to @findapr after I noticed the table contained a ton of old rows (approx 28k rows) 😄
January 8, 2026 at 1:55 PM
Fun little quiz:

Without cheating, what will the last line output in PHP?

This is something which used to catch me out all the time! 👀
January 7, 2026 at 6:16 PM
I've just hit a mini-milestone with my Email Utilities package:

It's crossed 100 stars on GitHub! ⭐

It's really close to hitting its first 1,000 downloads, too. I've just checked and it's been installed 995 times 👀
December 9, 2025 at 2:40 PM
I've just released Email Utilities for Laravel v1.1.0! 🎉

This release includes:

✅ Artisan command that can be used to update the disposable domain list (shown in the screenshot)
✅ Caching to improve performance
✅ An updated list of disposable domains (4932 domains!)

[1/2]
December 3, 2025 at 1:40 PM
I've just made a PR to Laravel to propose first-party support for sending transactional email with Mailtrap!

Is this something you might use? 😄

👉 PR: github.com/laravel/fram...
December 2, 2025 at 8:43 PM
I want to say a huge thank you to Mailtrap for sponsoring me on GitHub! 😄🎉

I've been using Mailtrap for a few years for email testing, and it's always been a great platform. So it's really cool that they're now sponsoring me!

Thanks! 🩵
November 24, 2025 at 1:12 PM
As of Laravel 12.36, you can use the "File::allDirectories" method to get an array of all nested directories (including nested directories) within a given path 🔥
November 7, 2025 at 4:27 PM
As of Laravel 12.29, you can use the "UseResource" and "UseResourceCollection" attributes to explicitly define the resource class and resource collection class a Laravel model should use 🔥
November 6, 2025 at 5:43 PM
Did you know PHP 8.5 adds a new FILTER_THROW_ON_FAILURE option for the `filter_var` function?

If the `filter_var` validation fails, it will trigger an exception to be thrown 🔥
October 29, 2025 at 2:12 PM
I've just released an early version of a small package so I can use these rules in my projects 😄

Repo: github.com/ash-jc-allen...

P.s. - I'd be forever grateful if you could star the repo ⭐
October 8, 2025 at 11:11 PM
Always the best emails to receive!

Huge thank you to everyone who's bought any of my books over the past 3 years. Your support means the world to me 🩵

I hope they've been useful and taught you new things!
October 8, 2025 at 3:23 PM
I've just made a PR to Laravel to add 2 new email validation rules: "domainIs" and "domainIsNot"

I don't know whether they'd be helpful to others, but they're something I'd definitely use 😄

What do you think?
October 6, 2025 at 10:33 PM
I've just released v1.1.0 of my Redactable Models package! 🎉

You can now set the hashing algorithm that should be used by the "HashContents" redaction strategy.

In this example, we're SHA256-ing the "name" and "email" fields of users who were soft-deleted over 30 days ago 😄
September 25, 2025 at 9:14 AM
Did you know you can encrypt the payloads of your queued classes in Laravel?

It's as simple as implementing the `ShouldBeEncrypted` interface 🔥

You can use it with:

✅ Jobs
✅ Notifications
✅ Mailables
✅ Listeners
September 24, 2025 at 3:50 PM
Did you know about the "non-empty-list" PHPStan annotation?

I use "list" on an almost daily basis, but only just learned about "non-empty-list" today 🤯

I think this could be super useful, so I'm gonna start using it in my code from now on 😄
September 17, 2025 at 4:40 PM
I love using enums and the "match" expression together in PHP!

I feel like they pair together really nicely 🔥
September 5, 2025 at 9:41 AM
My newsletter's been slowly but steadily growing over the past 5 years!

I wonder if I'll ever hit 10k subscribers? 👀

It's an arbitrary goal, but it'd be cool to hit that number 😄
September 4, 2025 at 11:25 AM
📚 One of the things I love about writing my own books is that I can keep referring back to them (even 2 years after their release!)

I needed to jog my memory on testing API integrations in Laravel.

A couple of minutes reading, and I'm back up to speed! 😄
August 27, 2025 at 3:05 PM
It looks like I'm slowly starting to get some traffic to my blog from ChatGPT!

It's only a small number of visitors.

But I'm really interested to see how much this number will grow (or shrink!) over the next few years 😄
August 25, 2025 at 2:42 PM
Favicon Fetcher 3.9.0 released! 🎉

On Friday, I tagged and released a new version of my Favicon Fetcher package. You can now grab favicons in your Laravel apps using DuckDuckGo's icon API 😄
July 28, 2025 at 9:19 AM
⚡ You can use the "never" type as a return type in PHP!

This indicates that the function/method will never return. This is useful if your method always throws an exception or uses something like "exit" 😄
July 28, 2025 at 8:53 AM
I'm loving the new "Operating Sytem" tab on my Fathom dashboard! 🔥
July 1, 2025 at 4:12 PM
⚡ As of Laravel 12.18, you can use the new "UsePolicy" attribute to explicitly define the policy that should be used for a model.

This can be useful if you don't store your policies in the default directories 😄
June 12, 2025 at 3:32 PM
As of Laravel 12.18, you can use the new "encrypt" and "decrypt" methods on the Illuminate\Support\Stringable class 🔥

This will be useful if you're chaining any string operations!

A cool contribution by Hristijan Manasijev 😄
June 11, 2025 at 11:29 AM