Optimize Bulk Insertions with Laravel's New fillAndInsert() Method
Laravel’s new fillAndInsert() method enables bulk insertions while applying model casting, timestamps, and UUID generation.
Read more [www.harrisrafto.eu]
Laravel’s new fillAndInsert() method enables bulk insertions while applying model casting, timestamps, and UUID generation.
Read more [www.harrisrafto.eu]
A couple of years ago, Laravel introduced a great feature which allows to run PHPUnit / Pest tests in parallel. This results in a big boost in performance.
By default, it determines the concurrency level by taking a look at the number of CPU cores your machine has. So, if you're using a modern Mac that has 10 CPU cores, it will run 10 tests at the same time, greatly cutting down on the time your testsuite needs to run completely.
A default runner on GitHub doesn't have that many cores, so you can't leverage parallel testing as good as in your typical local environments.
In this blog post, I'd like to show you a way of running your tests on GitHub, by splitting them up in small chunks that can run concurrently.
We use this technique at Oh Dear to cut down the running time of our vast testsuite from 16 minutes to only just 4. In this blog post all examples will come from the Oh Dear code base.
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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
Here's the recording of the talk I did at this years Laracon India. In this talk, I show how we use our laravel-multitenancy package to make Mailcoach tenant aware. Enjoy!
– aaronfrancis.com - submitted by Aaron Francis
Transforming and serving images from Laravel in a cache-friendly way.
Read more [aaronfrancis.com]
– www.youtube.com - submitted by Pascal Baljet
Learn how you can update an Inertia.js page in real-time using client-side visits—without overloading your server, even with many users online. Laravel Echo, Laravel Reverb, and a new Inertia v2 feature make it simple and efficient.
Read more [www.youtube.com]
We just tagged & released a new major version of spatie/laravel-csp, a package to manage your Laravel app's content security policy. The development goal for version 3 was to reduce the boilerplate of configuring a policy for common services like Google Tag Manager, Fathom Analytics, Adobe Fonts…
Read more [spatie.be]
– tighten.com - submitted by Kayla Helmick
This article shares 10 efficient and fun ways to seed your database, from classic PHP arrays to importing CSVs and using AI to generate random, realistic data.
Read more [tighten.com]
Here's how you can use our Laravel Data package.
Read more [matthiasweiss.at]
– stephenjude.me - submitted by STEPHEN JUDE
Read more [stephenjude.me]
– youtu.be - submitted by Bert De Swaef
This simple step-by-step guide teaches you how to deploy your Laravel project to Laravel Cloud! We'll cover everything from setup to handling queues for background tasks.
What you'll learn: ✅ Deploying a Laravel project to the cloud ✅ Setting up and managing queues ✅ Optimizing performance for scalability
Read more [youtu.be]
– ashallendesign.co.uk - submitted by Ash Allen
Read about how to use the Illuminate\Console\Prohibitable trait to prevent destructive commands from running in your Laravel application. We'll also look at how to prevent your own custom Artisan commands from running using this trait.
Read more [ashallendesign.co.uk]
– youtu.be - submitted by Bert De Swaef
Want to deploy your Laravel project on Forge with real-time WebSockets using Reverb? In this step-by-step tutorial, we’ll walk you through setting up Laravel Forge, configuring your server, and integrating Reverb for real-time communication. Whether you're building a chat app, notifications system, or live updates, this guide will help you get everything running smoothly.
Read more [youtu.be]
– tighten.com - submitted by Kayla Helmick
Learn how to install and configure Typesense in a Laravel app, then optimize search by sorting records, using filters, adjusting typo tolerance, accessing raw responses, and leveraging facets for better filtering.
Read more [tighten.com]
– stefanzweifel.dev - submitted by Stefan Zweifel
A new Laravel package to protect sensitive routes or actions with a confirmation-screen and ask for the two-factor authentication code of a user.
Read more [stefanzweifel.dev]
– medium.com - submitted by Mazen Touati
Tackling scalability challenges unorthodoxly in large monoliths with strategies like multi-application infrastructure, circuit fuse, and hybrid DB optimization.
Read more [medium.com]
– tighten.com - submitted by Kayla Helmick
This article covers installing Rich Text Laravel and Trix in a Laravel app, adding rich text attributes to models, migrating existing content from plain text, and integrating Trix’s file attachment feature with Laravel.
Read more [tighten.com]
This make testing endpoint authorization much simpler.
Read more [nolanphillips.substack.com]
The new finally method simplifies how you handle post-pipeline operations, whether your pipeline succeeds or fails.
Read more [www.harrisrafto.eu]
– infinitypaul.medium.com - submitted by Paul Edward
Here's how a unsuspicious validation rule can wind up making your app slower.
Read more [infinitypaul.medium.com]
Tony Lea created a new Chrome extension that will add a PHP tab in Chrome DevTools. Nice!
Read more [amitmerchant.com]