Hi there!

Welcome to the 150th freek.dev newsletter!

I hope you are well! It's been a good month for me: together with Christoph Rumpel I
launched our new course, and I finally got to see some of my programming friends again at
Laracon EU.

Together with my team at Spatie, I'm also working on a cool new package. Some of you might
have already seen me teasing it on Twitter. It's called Laravel Comments, and you can already
find the docs here here. We expect to release it somewhere in May.Next to Laravel Comments, we're also working
on something that I think is really cool, but I'll share something about that next time.

At the Oh Dear front, I developed a new feature called status page subscriptions.
I had a lot of fun coding up that one, and was reminded yet again that's Laravel's notification system
really is a thing of beauty.

I've also decided to make this newsletter a monthly one. The past few months, I felt some pressure
preparing enough content every two weeks. I think that whenever a hobby thing, like sending this
newsletter, starts to feel like work, you have to adjust what you're doing, to make room for things
you want to spend more time on.

You might wonder where my extra time will be spent at. At Laracon, I saw a fantastic talk from
Stefan Bauer in which he shared that you should do enough things outside of coding, and not try to
monitize everything. That message resonated with me. Since mid last year I bought some analogue
synthesisers, and I'm currently recording a full album with a buddy. For those interested, here's
a preview. Should you have ever recorded
some music, feel free to send me a link!

Ok! Back to programming! Here are a couple of links of which I hope you'll enjoy that as much as I did.

Learn how to write readable PHP that is a joy to maintain
I'm proud to announce that our new premium course on writing readable PHP is now available. It's called Writing Readable PHP.
This course contains a collection of bite-size tips (both in written form and videos) that make your code a joy to read
for your co-workers and future self.

How to build modals with Laravel and Livewire
A super nice way to go about this, thanks to Philo. Cool stuff!

PHP isn't dead
Last month, The Laravel Documentary was released which showed the history behind Laravel.
For the documentary a lot of people that are active in the Laravel community were interviewed.
From the footage that did not make into the documentary, the makers behind the documentary distilled
a cool new short movie about PHP.
I'm honoured the some of my interview snippets made the cut. 😎

Creating PHP interfaces, traits, and classes dynamically at runtime
PHP is a wonderful dynamic language that's capable of many cool things.

PHP Tricks: Multi-value match()
Larry Garfield shares a neat use of match

What the new PHP core developers will be working on
Here's a small interview with the new developers that will receive funding via The PHP Foundation

Laravel DDD - Getting started with DDD in Laravel
In a typical Laravel application we are very used to doing things in a certain way, by the book as they say.
However there comes a point in the applications lifetime that it is going to be easier to start looking to
split this code into Domains so that we can logically group our code.

How the PHP Middleware Pattern works and can easily be applied
The Middleware Pattern allows you to easily change the input and output of
an action; one layer at a time.

From PHPUnit To Pest
A couple of months I go I had the honour giving a talk at the GPUG usergroup on how to convert a PHPUnit testsuite to Pest.
Nowadays, I use Pest as the default testrunner for every package / project that I start.

Consume less, create more
A lot of things said in this post resonated with me.

Building Oh Dear's new design: Project setup
We are currently rebuilding the Oh Dear website and application frontend. In this post, you'll
read more about the project setup and tools used.


Community links

In this section you'll find links submitted by others.
Let me know if you did write or stumbled across a blog post, tutorial or video that might be interesting to appear in this section


Laravel Sliding Window Rate Limiter (submitted by Ari)

Facile Validator (submitted by Ali)

Mailgun Webhooks (submitted by Ankur)

Building A Saas App With Laravel Permission And Cashier (Subscription) 🚀 (submitted by Khalil Bouzidi)

Laravel Factories package to write your tests easier (submitted by Morteza)

19 Laravel Ecosystem Explained - Part 1 (submitted by Develop Line)

Laravel Hashids (submitted by Ari)

Get started with Laravel events and listeners (submitted by Andrew Schmelyun)

Testing Eloquent Query Scopes without Code Duplication (submitted by Turan KaratuÄŸ)

GitHub Actions vs BitBucket Pipelines vs GitLab CI/CD (submitted by Daniel Vigueras)

Using PHPUnit Data Providers to Test Validation Rules (submitted by Chris White)


Old posts

Here are a couple of links from a while ago!

Authoring Great Pull Requests

Simple Models, Scaffolding, Enabling Constraints

File watching with chokidar

Modelling time

Auto Merge Dependabot Pull Requests

Refactoring to Inertia Forms

Queuing up in meetings

The unreasonable effectiveness of print debugging

Dealing with expired signed URLs in Laravel

Develop faster by adding dev routes file in a Laravel app

PHP's bus factor

Keep controllers clean by using form requests in Laravel

Exploring Event Sourcing (part 2)

A lightweight solution for running PHP code concurrently

Back the func off, this is my abstraction!

Function Inlining in PHP's Zend Engine

Laravel Worldwide Meetup #8: Using Vite in Laravel & How to optimize your DB indexes

How Flare's GitHub integration works under the hood

Easily test large chunks of output using snapshots



Did you like this newsletter?

I take a lot of time curating the right links for you. You could do me a favor by either spreading the word and letting others know about my newsletter.

Alternatively you could consider picking up one of the paid products my team and I have worked on:

All spatie products
Oh Dear
Flare

For each of the above you can use this coupon code to get a discount:
DISCOUNT-FOR-FREEK-DEV-READERS

If you have any questions, remarks or thoughts about this newsletter, simply hit reply!
Thank you so much for reading!




Freek

You are receiving this newsletter because you subscribed at https://freek.dev
Unsubcribe from this newsletter
This mail was sent using Mailcoach