Hi there!

Welcome to the 152nd freek.dev newsletter!

I hope you are doing fine and are working on fun things.

Earlier this week I announced on Twitter that my team and I
are building Mailcoach Cloud, the hosted version of our highly
popular Mailcoach package. Using Mailcoach Cloud, you'll be
able to set up newsletter campaigns, drip campaigns and more in
no-time. In the following months, I'll share some more (technical) details.

We expect to launch Mailcoach Cloud by the end of summer. Should
you already have any questions about it, feel free to simply
reply to this email. We'll likely start beta testing during the
summer. Keep an eye on my Twitter account if you want to
help us test.

In the past month, we also released four new packages, which
we're all using in Mailcoach Cloud 🙂. You'll read some more
about those in the rest of the newsletter.

🏝 If you like my blog / newsletter, I would really appreciate
your vote in Tuple's very cool Send an Open Source Developer on Vacation contest.
Just search for "Freek Van der Herten" in the
nominees list and cast your vote. This holiday won't only be a
nice reward for me, but also for my girlfriend who always gives
me a lot of time working on open source packages and blog posts.

That being said, here are the links of this edition of the newsletter. Enjoy!

⭐️ Using Laravel Vite to automatically refresh your browser when changing a Blade file
You can use Laravel's shiny new vite-plugin to automatically refresh your browser when saving a Blade file.
This will save you a lot of time.

⭐️ Making Vite and Valet play nice together
When I tried to use Vite for the first time, I stumbled upon a few issues. Here's how I solved them.

⭐️ Using the `Attachable` interface to attach any kind of object to a mail in a Laravel app
Laravel 9 has gained a excellent new way to attach files in mails. Here's how we are using it in Media Library

A Laravel package to onboard your users
Caleb Porzio has created an onboard package for Laravel which we (at Spatie) recently took over development and maintenance on.

Highlighting code using Sidecar & Shiki
Shiki is a beautiful syntax highlighter powered by the same language engine that many code editors use.
We've just released a package that allows you to run Shiki on AWS Lambda through Sidecar.

Introducing sidecar-browsershot
A short introduction to sidecar-browsershot package: How it works and for what it can be used for.

Upgrading to native PHP enums
Tomas Votruba explains how you can refactor old enum classes (from Spatie and MyCLabs) to native PHP enums

How to use Stripe CLI with Laravel Valet to listen for events
Use the Stripe CLI with Laravel Valet to listen to webhooks locally.

Variadic arguments in PHP
A good overview what you can do with variadic arguments...

Good developer experience examples
A nice list of things to keep in mind when writing software or documentation.

What’s the best lossless image format?
What’s the best lossless image format? Comparing PNG, WebP, AVIF, and JPEG XL

Ten Tips to Make Conference Talks Suck Less
These tips are also useful for any kind of presentation, whether on a conference, or an internal presentation for your company.

New UUID formats
There are a couple of nice ideas there to solve longstanding problems with UUIDs

Linked Lists explained in PHP
Linked lists are a linear data structure that provides quick insertion and deletion.

Building social images with Browsershot and AWS
Creating social images for your website is super simple using Browsershot and AWS Lambda.

Add Interfaces to Laravel to Increase Code Readability and Verbosity
Personally I don't know if this is a good practice, but you (and future me) might like it.

Adding a Laravel backend to a Remix App
Dave Calnan has been using Remix in production for about 6 months now and has decided to add a Laravel backend
to the stack. Here's what he's learned from the process.


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


How to use Laravel Facades safely (submitted by Arunas)

Implementing external APIs (in Laravel) (submitted by Kristina Odziomkova)

Adding "Suggested Posts" to My Laravel Blog (submitted by Ryan Chandler)

How To Implement Laravel Dynamic Scheduling (submitted by Ian Kumu)

Laravel Hide Id from URLs: A Simple Implementation (submitted by Ian Kumu)

Extending Laravel Vapor to remove secret size limits (submitted by atymic)

How to use different Tailwind CSS configs with Laravel Mix (submitted by Ralph J. Smit)

Laravel DB Sync (submitted by David Carr)

Macros in Laravel (submitted by Ryan Chandler)

How to migrate a Laravel Inertia Vue app to Vite (submitted by Tim Geisendörfer)


Old posts

Here are a couple of links from a while ago!

No, Utility Classes Aren't the Same As Inline Styles

Modern Javascript: Everything you missed over the last 10 years

Saying Goodbye To Typo CI

Dear Future Me: I Am Not Alone

Clever vs insightful code

Optimizing Vue for Speed, Performance, and Core Web Vitals

Organizing Miscellaneous Utility Functions

Runtime (Big O) Of Laravel's One-Of-Many Relationship

Automatically fix PHP and JS code style problems on GitHub PRs

How to compile PHP from Source

How to Dynamically Update Twitter Cover Image to Show Latest Followers

Setting up and securing a private Composer repository

What about config builders?

Laravel Transporter, how to make OOP API requests

Laracasts now is an Inertia powered SPA



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