Moving 27K unique images from Spatie medialibrary local to s3 storage using Laravel Queue
On his blog, Robin Dirksen shares how he migrated the files of his app to S3
Read more [robindirksen.nl]
On his blog, Robin Dirksen shares how he migrated the files of his app to S3
Read more [robindirksen.nl]
Traits are a wonderful thing in PHP. You can use them to reduce code duplication by putting common functions in a trait and apply them to all classes where those functions are needed. I also sometimes use traits to break up a large function in multiple single-use traits.
In this post, I'd like to show you how you can override a trait function and call it from the overriding function.
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
Using our spatie/laravel-short-schedule package you can schedule commands at sub-minute intervals.
Laravel 8 offers a shiny new way to group multiple jobs into one batch. This will allow you to easily check how many job there are in a batch, what to total progress is and even cancel all jobs in a batch.
In this blog post, I'd like to share how we will use this feature in the upcoming v3 of Mailcoach. We'll also take a look at how batches are implemented under the hood in Laravel.
Earlier this year, our team released laravel-dashboard, a package that allows you to set up powerful dashboards in no time! In this talk, given at this years Laracon EU Online, I demonstrate how you can use it and how it works under the hood. Want to see more package source dives? Considering…
Using our laravel-model-cleanup package, you can easily remove old unneeded records from your database. We recently released a new major version that adds support for safely cleaning out huge tables.
In this blog post, I'd like to introduce this new release of the package to you.
Since version 5, Laravel has a built-in scheduler to perform tasks at regular intervals. In normal circumstances, these scheduled tasks will run just fine.
Out of the box, Laravel doesn't offer a way to see the status of the scheduled tasks. When did they run, how long did a task run, which tasks did throw an exception?
Laravel Schedule Monitor is a new Spatie package that monitors all schedule tasks in a Laravel app. In this blog post, I'd like to introduce the package to you.

I'm proud to announce our team is creating a new video course called Laravel Beyond CRUD. In this course, you'll learn various patterns to build a large scale Laravel app with your team. Even if you're not working on large Laravel apps, there are lots of things to learn to improve your projects.
This course will be offered as a premium video course, and as a book. The course will be presented by Brent, who is in the lead at various large scale client projects at Spatie. The book, also written by Brent, is beautifully designed by my colleague Seb.
At the Laravel Beyond CRUD website, you can subscribe to our email list. We'll notify you as soon as the course is available in September. We'll also mail you an extra preview.
I'm happy to announce the official Laravel Worldwide Meetup. This monthly meetup will be streamed via YouTube. The first edition will be held on 14th July at 18:00 UTC.
There is a select group of people, sometimes jokingly referred to as "The Elite" that you often see speaking at Laracons and other events. Even though you will probably see some of these fine artisans on the stream, the main goal of this meetup is to introduce new speakers to the community.
A few weeks ago, Jmac tweeted out an excellent idea. What if we could use try and catch in a collection chain?
Collections are the jam. Yet they leave me dreaming of more.
— Jason McCreary (@gonedark) June 1, 2020
Take this block that performs some custom validation logic by leveraging a value object constructor.
Collections definitely streamline it, but what if I could also chain the exception handling… 🔥 pic.twitter.com/4jj0uFgwWb
Meanwhile, Jmac and I did a few code pairing sessions to work on a possible implementation. We've added try and catch methods to the laravel-collection-macros package.
In this blog post, I'd like to share what you can do with these methods and how they work under the hood.
Dries Vints was a guest on my stream. He shared his newest project, called Blade UI Kit.
We released a new package called spatie/laravel-cronless-schedule. It can run the Laravel scheduler (or any other command really), without relying on cron. Instead of cron, a never-ending ReactPHP loop is used.
In this blog post, I'd like to introduce the package to you.
Laravel's native scheduler allows you to schedule Artisan commands to run every minute. For a project I'm working on I needed to schedule a command to run every few seconds. I found a good solution to do this using an ReactPHP powered event loop. Because this solution could be helpful for others as well, I decided to package it up.
Using the laravel-short-schedule package, you can schedule artisan commands to run every second or even lower frequencies. In this blogpost I'd like to introduce the package.
Steve King wrote a nice introduction on how to use our event sourcing package together with Livewire. Cool stuff!
Read more [www.juststeveking.uk]
Readability of code can be vastly improved by decreasing indentation. In this video we'll reverse conditions and early returns to accomplish this. If you want to see more videos like this one, head over to the video section at Spatie.
In this video, you'll learn how to generate code coverage reports, and how to display them directly in PhpStorm.
This video is part of our Laravel Package Training video course. In that course, you'll learn how to create both framework agnostic and Laravel specific packages. We'll also source dive some popular Spatie packages together, so you can pick up some tricks we apply there.
Together with my colleagues at Spatie, we have produced over 200 packages with more than 75 million downloads in total.
We learned a lot by quality packages like laravel-permission, laravel-backup, browsershot, laravel-medialibrary, and many more. We feel we have a pretty good workflow to produce reliable, readable, and maintainable packages.
We want to share the knowledge we have built up over the year with you in our new premium video course, titled Laravel Package Training.
Today we released a package to make Laravel apps tenant aware, called laravel-multitenancy. The philosophy of this package is that it should only provide the bare essentials to enable multitenancy.
The package can determine which tenant should be the current tenant for the request. It also allows you to define what should happen when switching the current tenant to another one.
It works for multitenancy projects that need to use one or multiple databases.
In this blog post, I'd like to introduce the package to you.
At Spatie we have a TV screen against the wall that displays a dashboard. This dashboard displays the tasks our team should be working on, important events in the near future, which tasks each of our team members should be working on, what music they are listening to, and so on. Here's what it looks like:

This dashboard is built using our laravel-dashboard package. It will allow you to built a similar dashboard in no time.
In this blogpost I'd like to walk you through both the dashboard and the package.
In this short video I demonstrate how you can display multiple Twitter feeds using laravel-dashboard. I will release the packages as soon as we hit 50 sponsors on GitHub.