Composer 2: What's new and changed
β php.watch
Composer version 2 will be mostly compatible with your existing workflows, while bringing some more great new features.
Read more [php.watch]
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.
"Freekβs newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
End-to-End Encryption in the Browser
A nice explanation of the window.crypto functions that are available in all major browsers.
Read more [blog.excalidraw.com]
Using the spread operator in PHP 7.4
Did you know that since PHP 7.4, it's possible to use the spread operator in arrays? π¨π»βπ¬ pic.twitter.com/Wg6Ouc5OYj
— NUNO MADURO (@enunomaduro) April 10, 2020
Directly assigning view variable
π₯ Applications often have the most lines of code within controller actions.
— Jason McCreary (@gonedark) April 13, 2020
One practice to streamline your code is directly assigning view variables.
This also limits the use of temporarily variables and promotes abstractions which make the code more readable. pic.twitter.com/m0JGsybQ9k
My First Golang
β chipperci.com
Chris Fidao shares his first Golang app that went into production.
Read more [chipperci.com]
Why does cron only offer minute granularity?
β superuser.com
I've often asked myself this question.
Read more [superuser.com]
Query time casting in Laravel
β twitter.com
π§ββοΈ One of my favorite Laravel 7 features is query time casting. This is super handy when using a subquery to get extra "non-model" data, such as a date. By default it would be a string. This feature lets you cast it to a Carbon instance "on the fly". πhttps://t.co/Kd94iMsomA pic.twitter.com/VIzowGy3um
— Jonathan Reinink (@reinink) April 15, 2020
Read more [twitter.com]
Using PEST in Laravel
β nunomaduro.com
My buddy Nuno is working on an interesting project to improve the experience of writing tests.
Read more [nunomaduro.com]
6 Eloquent Secrets
β laravel-news.com
At Laravel News, Stefan Bauer shared some cool Eloquent tips and tricks
Read more [laravel-news.com]
πΊ PhpStorm Tips with Christoph Rumpel
Dancing artisan Christoph Rumpel released a new video series on how to make PhpStorm look pretty and get the most out of it.
Read more [blog.jetbrains.com]
A first look at laravel-backup-server
At Spatie we have 100+ servers that we manage for our clients. The past few weeks, I've invested some time in creating a new Laravel package, called laravel-backup-server that can back them all up. In the video below you'll get a first look at the package.
A package to dump anything to the log original
In this post, I'd like to show you a quick demo of our new package called laravel-log-dumper.
Using Blade components for layouts
π₯ You can use @laravelphpβs Blade components for layouts too. Way cleaner than extending imho. pic.twitter.com/Ol29sCsOci
— Freek Van der Herten (@freekmurze) April 10, 2020
Replacing websockets with Livewire original
Up until a few days ago, the real-time UI of Oh Dear (an uptime monitoring SaaS I run) was powered with web sockets. We recently replaced this with Livewire components.
In this blog post, I'd like to explain why and how we did that.
I'm going to assume that you already know what Livewire is. If not, head over to the Livewire docs. There's even a short video course on there. In short, Livewire enables you to create dynamic UIs using server-rendered partials.
The Beauty of Single Action Controllers
β driesvints.com - submitted by Dries Vints
Dries Vints wrote a bost on why he uses single action controllers.
Read more [driesvints.com]
How CSRF protection, CORS and authentication work in Laravel
Mohammed Said tweeted out a couple of very interesting videos on some of Laravel's security related features.
Testing Cashier
β driesvints.com - submitted by Dries Vints
Here are three different ways you could test Laravel Cashier.
Read more [driesvints.com]
Using the 1-click-installer to set up Mailcoach in no time original
A couple of weeks ago, we released Mailcoach: an affordable, self-hosted solution to send out newsletters. Installing it into an existing Laravel application is quite easy if you have experience with Laravel.
We wanted to make getting started with Mailcoach easier for those without experience with Laravel or PHP. Using our a 1-click-installer on the Digital Ocean marketplace you can set up an entire Mailcoach installation in a couple of minutes.
In this blogpost I'd like to show you how you can use the installer and how we built it.
Date Ranges in Laravel
β medium.com - submitted by Pavol Perdik
In this article Pavol Perdik writes about the native PostgreSQL type daterange and how to easily use it in Laravel.
Read more [medium.com]