In Laravel projects, a lot of issues come from non-Laravel mistakes, database structure is one of those. In this tutorial, we will cover the most typical mistakes devs make when structuring DB in Laravel.
When working with shops and e-commerce projects, one common question is how to structure the DB of products with all attributes, variants, and options, like "iPhone - Black - 2 GB RAM - 1 TB Storage". In this tutorial, we will show our version of doing that.
If you want to replace DB auto-increment IDs with something more sophisticated, one of the solutions is UUID. In this article, I will show you how UUID columns work in Laravel, and what are the options and tools to use them.
In Laravel and Eloquent, to avoid N+1 Query problems or to find slow SQL queries, you may use automatic tools. In this short tutorial, I will show you a few of them.
Database Transactions are essential if you want to perform a few DB insert/update/delete operations and ensure the integrity of the data. Let's take a look at 5 different examples from Laravel open-source projects.
There are situations when we're not sure what the columns of the DB table would be, they need to be flexible. For example, e-shop product properties: size, color, fabric, there may be more in the future. What is the best DB structure? I will show you 3 options and their performance.