Sign in

Ash Allen

@ashallendesign.co.uk
1.4K followers 82 following 366 posts

🚀 Freelance Laravel Web Developer and Blogger ⚡ battle-ready-laravel.com 🔥 consuming-apis-in-laravel.com ✨ web-dev-freelancing.com

PostsRepliesMedia
Ash Allen @ashallendesign.co.uk · 11/06/2026
🔥 In PHP, you can use the "set" property hook to validate a value before setting it! Have you used property hooks in your PHP projects yet? Here's a simple example of only allowing an enum property to be set to specific enum cases:
110
Ash Allen @ashallendesign.co.uk · 04/06/2026
Fun PHP question: Without cheating, what does the second line output? 😄
110
Ash Allen @ashallendesign.co.uk · 09/04/2026
I've just made a PR to Laravel! ⚡ It proposes a new "Via" attribute which could be added to notification classes. It can be used to define hardcoded notification channels without requiring a "via" method. Is this something you'd use if it were merged? 😄
161
Ash Allen @ashallendesign.co.uk · 08/04/2026
Alternatively, you can enable the feature on a class-by-class basis like so:
010
Ash Allen @ashallendesign.co.uk · 08/04/2026
⚡ As of Laravel 13.4.0, you can use "FormRequest::failOnUnknownFields" to enable errors which will be thrown if unknown fields are passed in requests! Is this something you think you'd use in your own projects? 😄
282
Ash Allen @ashallendesign.co.uk · 03/04/2026
These are always the best emails to see when you start your day! 🎉
010
Ash Allen @ashallendesign.co.uk · 23/03/2026
My Short URL package is really close to hitting 2 MILLION installs! I think it'll hit it at the end of April 😄🎉
010
Ash Allen @ashallendesign.co.uk · 13/03/2026
It's been a busy morning! I've just updated all my Laravel packages to support Laravel 13 (and a few other small updates) 😄
071
Ash Allen @ashallendesign.co.uk · 16/01/2026
⚡ 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.
030
Ash Allen @ashallendesign.co.uk · 08/01/2026
🔥 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) 😄
030
Ash Allen @ashallendesign.co.uk · 07/01/2026
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! 👀
100
Ash Allen @ashallendesign.co.uk · 09/12/2025
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 👀
160
Ash Allen @ashallendesign.co.uk · 03/12/2025
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]
140
Ash Allen @ashallendesign.co.uk · 02/12/2025
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...
050
Ash Allen @ashallendesign.co.uk · 24/11/2025
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! 🩵
1110
Ash Allen @ashallendesign.co.uk · 07/11/2025
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 🔥
070
Ash Allen @ashallendesign.co.uk · 06/11/2025
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 🔥
030
Ash Allen @ashallendesign.co.uk · 29/10/2025
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 🔥
011
Ash Allen @ashallendesign.co.uk · 09/10/2025
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 ⭐
040
Ash Allen @ashallendesign.co.uk · 08/10/2025
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!
010
Ash Allen @ashallendesign.co.uk · 06/10/2025
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?
3140
Ash Allen @ashallendesign.co.uk · 25/09/2025
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 😄
020
Ash Allen @ashallendesign.co.uk · 24/09/2025
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
000
Ash Allen @ashallendesign.co.uk · 17/09/2025
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 😄
010
Ash Allen @ashallendesign.co.uk · 05/09/2025
I love using enums and the "match" expression together in PHP! I feel like they pair together really nicely 🔥
5160
Ash Allen @ashallendesign.co.uk · 04/09/2025
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 😄
021
Ash Allen @ashallendesign.co.uk · 27/08/2025
📚 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! 😄
130
Ash Allen @ashallendesign.co.uk · 25/08/2025
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 😄
020
Ash Allen @ashallendesign.co.uk · 28/07/2025
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 😄
170
Ash Allen @ashallendesign.co.uk · 28/07/2025
⚡ 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" 😄
060
Ash Allen @ashallendesign.co.uk · 01/07/2025
I'm loving the new "Operating Sytem" tab on my Fathom dashboard! 🔥
000
Ash Allen @ashallendesign.co.uk · 12/06/2025
⚡ 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 😄
020
Ash Allen @ashallendesign.co.uk · 11/06/2025
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 😄
020
Ash Allen @ashallendesign.co.uk · 02/06/2025
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? 😄
380
Ash Allen @ashallendesign.co.uk · 13/05/2025
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 🤯
160
Ash Allen @ashallendesign.co.uk · 02/04/2025
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!
030
Ash Allen @ashallendesign.co.uk · 31/03/2025
🔥 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!
020
Ash Allen @ashallendesign.co.uk · 27/03/2025
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
010
Ash Allen @ashallendesign.co.uk · 11/03/2025
🔥 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 😄
151
Ash Allen @ashallendesign.co.uk · 04/03/2025
Always the best emails to receive in my inbox! 🔥
040
Ash Allen @ashallendesign.co.uk · 03/03/2025
I'm loving the UFO light in my office! My wife bought it for my birthday last month! 😎🛸
050
Ash Allen @ashallendesign.co.uk · 28/02/2025
Which approach do you use for scheduling Artisan commands in your Laravel apps? I prefer using the class names 😄
6100
Ash Allen @ashallendesign.co.uk · 17/02/2025
I'm working on the physical version of "The Web Dev's Guide to Freelancing" book today! Hopefully, you'll be able to buy printed copies pretty soon 😎
010
Ash Allen @ashallendesign.co.uk · 13/02/2025
Someone's given Battle Ready Laravel a 1-star review on Amazon 😭 I wish there were a way for me to find out why. The last thing I want is for someone to feel unhappy with their purchase!
201
Ash Allen @ashallendesign.co.uk · 12/02/2025
🔥 You can use "DB::prohibitDestructiveCommands" to prevent commands, such as "migrate:fresh", from running! This is useful for preventing accidental runs of destructive commands in your production environment. I can't believe I've only just found out about this! 🤯
050
Ash Allen @ashallendesign.co.uk · 17/01/2025
You can use the "Override" attribute in PHP to specify that a method is overriding its parent method 🔥 This is useful for being alerted when a parent method you expect to exist no longer exists! Is this something you've used before? 😄
0100
Ash Allen @ashallendesign.co.uk · 14/01/2025
The Web Dev's Guide to Freelancing is now available to buy! 🎉 👉 web-dev-freelancing.com Learn tips, tricks, and strategies you can use to launch your freelance career! 🔥 20% discount code: FREELANCE20
031
Ash Allen @ashallendesign.co.uk · 13/01/2025
Releasing tomorrow! 🎉 I'm getting really nervous (and excited) now! 😄
010
Ash Allen @ashallendesign.co.uk · 11/01/2025
I'm doing some pre-release testing for my new book on my Kindle 👀 Can't wait to release this on Tuesday!
190
Ash Allen @ashallendesign.co.uk · 09/01/2025
I'm using "OneDark" 😄
110