Automating the Laravel 8 schema dump using GitHub Actions
– fidum.uk
Dan Manson explains how you can run that shiny new schema:dump command on GitHub actions. Pretty cool
Read more [fidum.uk]
Posts tagged with database
– 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]
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.
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]
Over at the Honeybadger blog, Starr Horne wrote an interesting article on the different types of UUIDs and ULIDs.
UUIDs are and will continue to be the standard. They've been around forever, and libraries are available in every language imaginable. However, new approaches are worth considering, especially as we enter a world that's increasingly run by distributed systems. New unique-id approaches may help us solve problems that weren't prevalent at the publication of RFC4122.
Read more [blog.honeybadger.io]
⚠️ Make sure to always use the right types when querying (Eloquent version) ⚠️#laravel #php #mysql #castingisfun pic.twitter.com/TMnjYbuoCe
— Freek Van der Herten (@freekmurze) February 10, 2019
Read more [twitter.com]
Mohammed Said shows a great way on how to handle db connections in a multi tenancy Laravel app.
The majority of applications just communicate with a single database. However, a considerable portion of laravel applications communicates with multiple databases. There are some neat packages that help with managing multiple connections, but it'd be useful if we understand how database connections work in Laravel, so let's dive in.
Read more [divinglaravel.com]
Jonathan Reininck wrote a cool article on how you can create dynamic releationships. This technique will keep the number of queries and the memory used to a minimum.
I hope that gives you a good overview of how you can use subqueries to create dynamic relationships in Laravel. This is a powerful technique that allows you to push more work into the database layer of your app. This can have a huge impact on performance by allowing you to drastically reduce the number of database queries executed and overall memory used.
Read more [reinink.ca]
Mattias explains a problem we recently encountered at Oh Dear with Telescope.
For Oh Dear!, we're using Laravel Telescope as a convenient way of tracking/displaying exceptions, runs, ... It stores its exceptions in the database, so you can easily view them again. It stores those in a TEXT field in MySQL, which is limited to 2^16 bytes, or 65536 bytes. Some of our exceptions tend to be pretty long, and they were hitting this limit.
Read more [ma.ttias.be]
My colleague Brent explains how you can easily work with MySQL views in Laravel.
MySQL views are a way of storing queries on the database level, and producing virtual tables with them. In this post we'll look at why you want to use them and how they can be integrated in Laravel with Eloquent models.
Read more [stitcher.io]
Joseph Silber, a very active Laravel contributor, has written a new blogpost on morph maps, a feature to decouple your database from your model class names.
Polymorphic relations let you set up a relationship between many different model types, without the need for extra tables. This works by storing the "morphable type" (explained below) in the database, in addition to the morphable type's ID. By default, the morphable type stored in the database is the model's full class name. While this works, it tightly couples your database to your PHP application. Let's look at how we can instruct Eloquent to use more generic values for these morphable types.
Read more [josephsilber.com]