Offset vs Cursor Pagination in Laravel
– www.laravel-enlightn.com - submitted by Paras Malhotra
An in-depth guide on offset and cursor pagination in Laravel, and the pros and cons of each.
Read more [www.laravel-enlightn.com]
Posts tagged with database
– www.laravel-enlightn.com - submitted by Paras Malhotra
An in-depth guide on offset and cursor pagination in Laravel, and the pros and cons of each.
Read more [www.laravel-enlightn.com]
Here's the recording of Laravel Wordwide Meetup #8. My guests for this edition were Kai Sassnowski talking on the importance of DB indexes, and Sebastian De Deyne on how to use Vite in Laravel.
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."
There are many SaaS applications that allow potential new customers to try out the service using a trial period. Of course, not everybody will convert. After the trial period is over, some people will not use the service anymore. However, if nothing is being done about it, their email address and…
– naxon.dev - submitted by Daniel Naxon
I needed to display only the first picture from my Product's model media collection and found my app running five queries and hydrating 16 models with only four products to display 😱 . Here's how I ended with only two queries and eight models.
Read more [naxon.dev]
– atymic.dev - submitted by atymic
Overview of the new upsert feature in Laravel 8.10, how to use it and some tips.
Read more [atymic.dev]
– 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]
When reviewing the contents of the database of Flare, we encountered a table with 1 billion records. Technically that isn't a problem. Flare runs on Vapor and uses an Aurora database, so it can handle that scale. But of course, there's a cost for storing that many records.
We dove in and concluded that we could safely delete about 900 million records. They all were created before a specific date.
Read more [flareapp.io]
– fidum.uk
Dan Manson explains how you can run that shiny new schema:dump command on GitHub actions. Pretty cool
Read more [fidum.uk]
Databases are the backbone of most modern systems, so taking some time to understand how they work is a good investment for any developer.
Read more [hakibenita.com]
Matthias Noback shares his thoughts on when you should and when you shouldn't rely on the database to perform certain tasks
Read more [matthiasnoback.nl]
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.
Jonathan Reinink published another excellent blogpost on db performance.
Read more [reinink.ca]
– 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]
Laurie Voss, co-founder of npm, explains how databases work, what the difference is between MySQL and something like Redis, why MySQL is popular and much more!
My twitter-friend Simon had a simple question that contained much complexity: how do databases work? The result was an absurdly long thread of 70+ tweets, in which I expounded on the workings and history of databases as used by modern web developers, and Simon chimed in on each tweet with further questions and requests for clarification. The result of this collaboration was a super fun tiny explanation of databases which many people said they liked, so here it is, lightly edited for clarity.
Read more [seldo.com]
sql tips: you can group by anything pic.twitter.com/YoJVlUyghG
— ?Julia Evans? (@b0rk) 29 september 2019
Read more [twitter.com]
CASE is SQLs answer to other programming languages IF-ELSE statement. If you need to test a condition and return a value CASE is the expression you need.
Read more [www.helenanderson.co.nz]
And if you're a @laravelphp user wondering how you can use this feature, you can easily extend the query builder to support this. ?
— Jonathan Reinink (@reinink) July 16, 2019
Gist here: https://t.co/Wuavz0v7p9 pic.twitter.com/Vy6NJdJbcx
Read more [twitter.com]
Jonathan Reinink wrote another awesome post on how to handle a complicated query.
I was asked recently how to calculate multiple totals (aggregates) in Laravel in the most efficient way. For example, maybe you have an email subscription service and want to display various totals based on your subscribers
Read more [reinink.ca]
Povilas Korop explains how to use a raw groupBy in Laravel. Cool!
Read more [laraveldaily.com]
Here's a neat trick for soft deleting relationships in @laravelphp. ?
— Jonathan Reinink (@reinink) February 27, 2019
When you delete a record, immediately also soft delete any child records. ?
Later, when you restore the parent, automatically also restore all child records that were deleted when the parent was deleted. ? pic.twitter.com/YsYKWtu00R
Read more [twitter.com]