Hi there!
Welcome to the 173rd freek.dev newsletter!
Here are a couple of links I hope you'll enjoy as much as I did.
⭐️ Reducing PHP's CPU usage by nearly 40% by upgrading from Ubuntu 20.04 to 22.04
At Oh Dear we've updated the OS on our servers and discovered a pretty nice side effect.
⭐️ Adding wire:navigate to Markdown links
Here's a new package that we created to improve the Ray docs.
Product for Engineers: Helping engineers flex their product muscles (sponsored link)
Product for Engineers is PostHog’s newsletter dedicated to helping engineers improve their product skills. Subscribe for free to get curated advice on building great products, lessons (and mistakes) from building PostHog, and deep dives on top startups.
⭐️ Sniffing out stray ray() calls with Pest architecture testing
Whether you're building a shiny new feature or refactoring a bug deep in a legacy codebase, before you merge your work to production you want to get rid of all those ray() calls you littered the codebase with.
Validate Data Types in Laravel Collections Using the ensure() Method
Learn about the "ensure" method and how to use it to verify that only items of a given data type exist in Laravel Collections.
Adding text to an image using PHP and GD
There might be many reasons you need to add text on top of an existing image.
Embed Livewire Components Using Wire Extender
Wire Extender allows you to embed any Livewire component on any website or even within a static HTML file.
How to use GitHub Actions build matrix to deploy artifacts to multiple servers
Philo explains in great detail how to achieve this
My Reusable GitHub Actions Workflows
Stefan's backup workflow is very interesting.
Laravel Zero - Let's build a TCP server
Building console applications can be a lot of fun, but also quite challenging. Laravel Zero, however, falls short in the first part.
Running custom Artisan commands with Supervisor
While Supervisor is commonly used with queue-related commands, there is nothing stopping you from using Supervisor to run and monitor your own custom commands.
Laravel Artisan Command Dependency Injection
You should consider using the handle() method for dependency injection in Artisan commands.
Retry mechanisms in Laravel
Laravel provides some excellent 'Retry' mechanisms out of the box for handling transient failures!
In this article, we'll learn about these mechanisms to build a reliable system using Laravel!
Improved handling of 404 errors with Livewire
I like to use the findOrFail() function in Livewire methods that call actions. But I really don't like the default behaviour of Livewire showing a modal view with a 404. Let me show you how to personalise that.
Composition over Inheritance
Learn about Composition, Inheritance and what Composition over Inheritance means with a little help from some 8-bit friends!
Using Laravel to interact with OpenAI's Assistants API (with Vision)
A step-by-step guide on how to utilize the new Assistants and Vision APIs with Laravel.
The Business of Bisecting
At PHPUKConference 2024 I saw this excellent talk by Pauline Vos on a pretty powerful git feature: bisect.
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
Package In Review: openai-php/laravel (submitted by Bert De Swaef)
Introducing our new suite of JavaScript packages (submitted by Spatie)
Show popular content from a specific period in Laravel (submitted by Aleksander Tabor)
Why wrapping 3rd-party calls to external services is always a good idea (submitted by Luka Peharda)
How to fix S3 error “The bucket does not allow ACLs” in Laravel (submitted by Chrysanthos)
How To Integrate Cloudflare R2 Storage with Laravel (submitted by Harry Kirkman)
Fix Flaky Tests with Pest Repeat (submitted by Sean Kegel)
Never Miss a Webhook (submitted by Chris Fidao)
The Ultimate Laravel Admin Panels Overview in 2024 (submitted by Erik Masny)
Using Collection::times() in Laravel (submitted by Ash Allen)
Impersonating users made easy in Laravel - Package In Review: 404labfr/laravel-impersonate (submitted by Bert De Swaef)
Essential JavaScript Tips for Better Coding - A Guide to JavaScript Best Practices (submitted by Harish Kumar)
Laravel Cache Classes (submitted by Sean Kegel)
Laravel 11 - What is new? (submitted by Bert De Swaef)
Best Raycast Extensions for Laravel/PHP Developers (submitted by Aleksander Tabor)
Old posts
Here are a couple of links from a while ago!
Collecting Time Video Metrics with Livewire
Making the best all-in-one monitoring tool even better
Blazingly Fast Markdown Parsing in PHP using FFI and Rust
PHP wishlist: The pipe operator
Behind The Scenes Of Oh Dear
Preemptive Pluralization is (Probably) Not Evil
Leverage Symfony VarDumper Component to Enhance your Dumps
Make more things the same
Valet 4.0 is released
Discovering PHP's first-class callable syntax
See Laravel Folio and Laravel Volt in action
QR Code Generator in Laravel 10
Resolving a new instance of a singleton in Laravel
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:
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 freek.dev
Unsubscribe from this newsletter
This mail was sent using Mailcoach
|