Ash Allen

@ashallendesign.co.uk

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

🔥 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:

Bild

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? 😄

Bild

⚡ 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? 😄

Bild

⚡ 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.

Bild

I've just finished writing an article about memoisation in Laravel which covers: 👉 Using the "once" helper 👉 Using "once" in methods and static methods 👉 How "once" is handled in Octane apps 👉 Alternatives to "once" Hoping to publish it on Monday 😄

My latest freelance contract has just come to an end this week. So I'm now available to take on new Laravel projects/work! If you're on the lookout for a Laravel dev with plenty of experience, feel free to give me a shout! 😎

🔥 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) 😄

Bild

What level do you run PHPStan at in your projects? I've personally found level 5 or 6 to be the sweet spot (especially when adding it to existing projects) 😄

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 👀

Bild

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]

Bild