Ash Allen
banner
ashallendesign.co.uk
Ash Allen
@ashallendesign.co.uk
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
I've just made a PR to Laravel to add a new "AsUri" model cast!

It will cast strings in your DB to instances of "Illuminate\Support\Uri". And vice versa, back to strings when storing the value.

Is this something you think you would use if it gets merged? 😄
June 2, 2025 at 8:33 AM
Did you know you can pass an array to the "str_replace" function in PHP?

It will perform the replacement on each entry in the array!

I can't believe I didn't know about this until now 🤯
May 13, 2025 at 1:34 PM
Woohoo! My new books have arrived 🎉

Physical copies of "The Web Dev's Guide to Freelancing" are now available on Amazon!

👉 Search for the book's name on your region's Amazon site to buy your copy!
April 2, 2025 at 7:56 PM
🔥 You can use the "Number::ordinal" and "Number::spellOrdinal" number methods to convert numbers to ordinals in your Laravel apps.

A great example use case for this is displaying results for a leaderboard!
March 31, 2025 at 10:17 AM
The proof copies have arrived! 🎉

It feels amazing seeing another of my books come to life 😄

It should be available to buy on Amazon in the next day or so
March 27, 2025 at 1:59 PM
🔥 You can use the `Number::fileSize` method in your Laravel apps to convert file sizes (in bytes) to more human-readable representations!

This is handy for displaying file sizes in your UI 😄
March 11, 2025 at 9:24 PM
Always the best emails to receive in my inbox! 🔥
March 4, 2025 at 10:09 PM