🏝 If you like the content of this blog, I would really appreciate your vote in Tuple's 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.

Stay up to date with all things Laravel, PHP, and JavaScript.

Follow me on Twitter. I regularly tweet out programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

Using Laravel Vite to automatically refresh your browser when changing a Blade file

Original – by Freek Van der Herten – 2 minute read

Yesterday, the Laravel team released the vite-plugin. Going forward, Vite will become the standard build tool for Laravel apps.

One of the cool features of this Vite integration is that you'll get hot reloading by default. Whenever you run Vite with nom dev and modify a JS or CSS file, Vite will automatically recompile the assets and refresh your browser. This way, you won't have to refresh your browser manually after making a change.

Wouldn't it be cool if this automatic refresh would work when we're changing a Blade file?

Read more

Making Vite and Valet play nice together

Original – by Freek Van der Herten – 3 minute read

Yesterday, the Laravel team launched the official vite-plugin. From now on, Vite will be the standard build tool for Laravel. The main benefits are vastly improved build times and a more straightforward API. Want to know more about it? Head over to the official docs. There's also a migration guide to go from Mix to Vite.

When I followed that guide to upgrade the freek.dev codebase from Mix to Vite , npm dev could successfully start-up Vite, but in the browser the JS / CSS did not load. Let's review how I could fix that.

Read more

Using the `Attachable` interface to attach any kind of object to a mail in a Laravel app

Original – by Freek Van der Herten – 4 minute read

Laravel 9 has gained a excellent new way to attach files in mails. Using the Attachable interface, you can specify what should happen when an object gets used as an attachment.

Using our media library package you can easily associate any file with an Eloquent model. We've added support for Laravel's Attachable in the latest version of the package.

In this blog post, I'd like to tell you all about it.

Read more

A Laravel package to onboard your users

Link – – rias.be

Onboarding your users is one of the most important things you can do in your SaaS or application. After all, first impressions matter! Caleb Porzio has created an onboard package for Laravel which we (at Spatie) recently took over development and maintenance on.

Read more [rias.be]