Ash Allen
@ashallendesign.co.uk
1.4K followers 82 following 290 posts
🚀 Freelance Laravel Web Developer and Blogger ⚡ https://battle-ready-laravel.com 🔥 https://consuming-apis-in-laravel.com ✨ https://web-dev-freelancing.com
Posts Media Videos Starter Packs
ashallendesign.co.uk
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 ⭐
ashallendesign.co.uk
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!
ashallendesign.co.uk
I think that's a sensible approach! 😄
ashallendesign.co.uk
Unfortunately, the PR was closed and didn't get merged! 😭

I'm thinking of building a small package which includes some extra email validation rules. So I'll add these two methods to it! 😄
ashallendesign.co.uk
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?
ashallendesign.co.uk
Thanks! Unfortunately, it didn't get merged. But I'm thinking of adding these rules (and similar) to a small package 😄
ashallendesign.co.uk
Nice! Unfortunately, it didn't get merged 😭

And that's a good question! I couldn't decide between `domainIs` or `domainIn` haha. I kept toying with both ideas and eventually decided to choose `domainIs` just so I could get the PR ready haha 😄
ashallendesign.co.uk
Cool PR! It's a shame it didn't get merged :(

Although, I can't remember building a `fileSize` helper anywhere haha 😅
ashallendesign.co.uk
Nice, this approach looks pretty cool 😄
ashallendesign.co.uk
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?
ashallendesign.co.uk
Nice! Out of pure curiosity, is there a particular reason you add it? Or is it just something you do naturally without thinking about it? 😄
ashallendesign.co.uk
Ahh yeah! I'm guessing you mean like if you had app/Console/Commands/SendReports.php and app/Jobs/SendReports.php files? 😄
ashallendesign.co.uk
Ahh yeah, I'd always add them to my controllers too 😄
ashallendesign.co.uk
In all fairness, I'm pretty much the same. I think I must have just used whatever I fancied using at the time, so there's a mixture of the two 😂
ashallendesign.co.uk
Laravel devs, when you're creating new commands, do you add the "Command" suffix to the classname?

E.g., which of these would you choose?

👉 App\Console\Commands\SendReports
👉 App\Console\Commands\SendReportsCommand

P.s. - I've ignored sub-folders. The question is solely on the "Command" suffix 😄
ashallendesign.co.uk
GDPR compliance was exactly the use case I had for this 😄

Maybe it'll come in handy in a future project for you!
ashallendesign.co.uk
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 😄
ashallendesign.co.uk
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
ashallendesign.co.uk
I keep seeing mentions of the Tempest PHP framework online. And from what I've seen, it looks pretty cool!

I'm tempted to give it a spin locally and see what it's like!

I especially like the look of the typed properties on models and the attributes for adding validation 😄
ashallendesign.co.uk
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 😄