Hi there!

Welcome to the 148th freek.dev newsletter!

I hope you are doing well.

The past period was a busy, but good one for me. My team and I got a lot of things done.
In this newsletter that we sent to all people subscribed to the spatie.be mailinglist, I mentioned
all the things we have been doing at Spatie this year. I was surprised myself that it's a lot.
Additionally we also released Ray 2.0, which brings multi window support, a much requested feature.
If you ever feel that you might not be doing enough, start writing down what you did in a past week or month.
You might be surprised too.

Some less fun stuff has happened as well. Last week, I saw a link to security report on Laravel MediaLibrary Pro on Twitter.
We immediately made fixing this our highest priority. When you're working on an issue like this, there always tension between
wanting a communication out the door very fast, and creating the best possible fix. I decided to only communicate when we had
a fix that was confirmed to be working. We send this mail to all the Media Library Pro users yesterday.
Handling security issues is always a bit stressfull, but I firmly believe that owning up to the mistakes that you make
is necessary for learning from them.

Over at the Oh Dear side, some exciting things are happening as well. A side effect of
Oh Dear doing well, is that Mattias and I couldn't handle all support and development by ourselves anymore.
That's why two amazing developers, Sean and Nick, have joined our team. Sean will handle
day to day support, Nick is working on a full redesign of the app which we'll launch in the coming months.

In the beginning of March I migrate Oh Dear away from Spark to the Stripe Customer Portal. This enables
more payment methods (Europeans can now subscribe using SEPA), and multi-currency. Because this migration touched
all our customers and subscription data, I was, even with extensive testing, a bit nervous, but I'm glad that everything went well.
Having seen my Spatie colleague Ruben perform a similar migration previously for Flare certainly helped.

In the next period, I'll concentrate on a package I'm working on, called Visit. Christoph and my colleagues
and I are busy creating a new course called Writing Readable PHP.
I'm also prepping a new conference talk titled "Fantastic Functions And Where To Find Them".
In that talk I'll show some cool things that you don't do with PHP everyday.

And I also highlight some cool PHP community projects that were heavily influenced by ideas in other
ecosystems. I'll perform this talk for the very first time next week as the keynote on Drupal Dev Days in my home city Ghent.
I honestly never thought I was going to keynote a Drupal conference, but here we are :-)


Thanks for reading, And enjoy the links below!



Use "dd()", "dump()", and "ray()" in any PHP file on your system
I'm proud to announce that Steve Bauman and our team at Spatie have released a new tool called spatie/globay-ray.
When installed, you'll be able to use dd, dump and ray functions in any PHP file on your system.
Avoid using else
Using else often encourages complexer code structure, makes code less readable.

Code that breathes
A very small, but efficient trick to make code more readable

Clean Coders Hate What Happens to Your Code When You Use These Enterprise Programming Tricks
This talk by Kevlin Henney looks at how a handful of coding habits, design practices and assumptions can
systematically balloon code and compound its accidental complexity.

Testing the homepage of a Laravel app using Pest
Getting started with testing is not that hard. Here's a free video taken from the Testing Laravel course that
will show you how you can make sure you homepage works.

All the hardware and software used at Laracasts
Here's an exhaustive list of all the tools Jeffrey Way uses in his daily workflow at Laracasts.

Use a message envelope
The use of a message envelope has many benefits for the design of your application. It allows you to carry system
information, nicely separated from domain information, in a generic way.

Laravel Origins: The Documentary
This is an amazing documentary that shows the origins of Laravel, and it's 12 year journey. I'm honoured
being a part of this.

Running PHPUnit tests in parallel using GitHub actions
One of our projects has a really large test suite that isn't optimised to run with Laravel's parallel
testing. It was starting to take more than 15 minutes to have the whole test suite run inside Github Actions, which
is when my colleague Rias searched for a better way to do this.

Errors when using groupBy() in laravel
Are you getting errors with laravels groupBy()? Here is short explanation of why.

The value of a good database design
A good database design just like good clean code is the key to performance

Measuring performance with Apache Benchmark
A script to easily take consistent measurements using Apache Benchmark.
How to improve privacy with Laravel file encryption
Let's improve your users privacy with file encryption without using any 3rd party packages.

Common SQL errors for Laravel Developers
I hope you won't run into any of these.

CSS as the backend: introducing Cascading Server Sheets!
Obviously you shouldn't to this, but it's kinda cool that it works.


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 Eloquent Case (submitted by Agli Pançi)

3, 2, 1 and Action - Github Action (submitted by Albert Suntic)

A Practical Guide to Containerizing Laravel Applications With Docker (submitted by Filip Josifovski)

Using GitHub Dependabot with a Monorepo (submitted by Chris Rhymes)

AWS SES Webhooks client (submitted by Ankur)

Hidden Laravel Feature - Bootable Trait (submitted by Ashish Dhamala)

How to use Laravel And Hasura For Instant GraphQL (submitted by Robert Mellett)

How to handle both API and Basic authentication in Laravel (submitted by Ricardo Čerljenko)


Old posts

Here are a couple of links from a while ago!

Using Tailwind's JIT compiler with Laravel Mix

A JIT compiler for Tailwind CSS

Managing your DNS from GitHub with DNSControl

Styling Forms with Tailwind CSS

Introducing monthly playlists from team Spatie

Fibers in PHP: A new opportunity for async PHP?

Rationing Your Laravel Queue Workers Memory And CPU Consumption

Validating Laravel Console Input

Execute Artisan commands on remote servers

Building a Laravel package from scratch

A practical look at multi tenancy in Laravel

Debug apps running on remote servers using Ray



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