Lessons From Eloqent Performance Patterns (Cheatsheet)
– stephenjude.me - submitted by STEPHEN JUDE
Read more [stephenjude.me]
Posts tagged with eloquent
– stephenjude.me - submitted by STEPHEN JUDE
Read more [stephenjude.me]
– youtu.be - submitted by Bert De Swaef
In this episode of the Quick Win Wednesday series, we're taking a look at whereAny(), which was released with Laravel 10.47. A very elegant way of grabbing data based on a conditional "any of the following columns".
Read more [youtu.be]
Join thousands of developers
Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.
No spam. Unsubscribe anytime. You can also follow me on X.
– alsterholm.com - submitted by Andreas Alsterholm
This article showcases how you can use Eloquent models, rather than a traditional boolean column, as flags in your Laravel application.
Read more [alsterholm.com]
– seankegel.com - submitted by Sean Kegel
Use tappable scopes in Laravel to break down complex queries into reusable pieces without needing to use magic query scopes in Laravel.
Read more [seankegel.com]
– muhammedsari.me - submitted by Muhammed Sari
Muhammed's been working with Eloquent for over half a decade now, and it's time to share his next bag of tricks. You are guaranteed to learn something new!
Read more [muhammedsari.me]
– muhammedsari.me - submitted by Muhammed Sari
Muhammed's been working with Eloquent for over half a decade now, and it's time to share his bag of tricks. Buckle up, it'll be a good ride!
Read more [muhammedsari.me]
We've released a new package called spatie/laravel-deleted-models. When deleting a model, this package will copy over its attributes to a table called deleted_models.
You can view this package as a "Recycle bin for models".
In this post, I'd like to tell you all about it.
– tray2.se - submitted by Patrik Ahlström
What is a database view, and how can we use it to make our code cleaner?
Read more [tray2.se]
While working on the upcoming Oh Dear redesign, I noticed that list that displays all sites of a team was very slow.
To display that list, a lot of queries were used. With a couple of minor adjustments, I could reduce the number of queries needed to just a single one, solving the performance problem.
In this small blog post, I'd like to share one of the techniques I used.
Martin Joo shares some cool things you can do with Laravel's ORM.
Read more [martinjoo.dev]
– protone.media - submitted by Pascal Baljet
In this series, I show you new features and improvements to the Laravel framework since the original release of version 8. This week is about the Database and Eloquent features in Laravel 8.
Read more [protone.media]
In your tests, you might have used assertDatabaseHas to make sure that a model actual is persisted.
When you are working with a one-to-many relationship, it is sometimes the case that a particular instance on the "many" side of the relationship is flagged as unique and important to your system in some way. It can be really handy to be able to access that unique instance in a first class way from your models. This post is going to cover how you can do that without introducing any new concepts into your application.
Read more [timacdonald.me]
– protone.media - submitted by Pascal Baljet
Introducing a new Laravel package that allows you to re-use scopes as a boolean attribute on Eloquent models.
Read more [protone.media]
– timacdonald.me - submitted by Tim Mac
Here's how to handle moving from a classic foreign key constrained relationship, to a polymorphic relationship in Eloquent, without impacting the end user.
Read more [timacdonald.me]
At Laravel News, Stefan Bauer shared some cool Eloquent tips and tricks
Read more [laravel-news.com]
Atymic explains a cool new feature in Laravel 7
Read more [atymic.dev]
Jonathan Reinink has added a very usefull metric to Laravel debugbar
Last week at Laracon US I gave a talk titled Eloquent Performance Patterns. In that talk I used a custom Laravel Debugbar metric I created to track how many Eloquent models were being hydrated throughout a request. I've had a lot of people asking about this, so today I submitted a pull request to the Laravel Debugbar to add this as an official metric.
Read more [reinink.ca]
? The fundamental key to understanding Eloquent. pic.twitter.com/WkaKIFaeOR
— Caleb Porzio (@calebporzio) July 1, 2019
Read more [twitter.com]
In the project that @freekmurze and I are working on, I needed the ability to replicate an existing Eloquent model into a different Eloquent model.
— Marcel Pociot ? (@marcelpociot) June 12, 2019
If you feel like this could be useful for you as well, here's the little trait for that:https://t.co/IXFpAsxE35 pic.twitter.com/fCccKmLdQs
Read more [twitter.com]