Johnathan Smith

Full Stack Laravel Developer + Consultant

Tag: Mysql

Blazing Fast polymorphic relationship database queries in Laravel

Blazing Fast polymorphic relationship database queries in Laravel

For mysql, postgres, sqlite, and other relational databases

Eloquent Trick to get amazing speeds with polymorphic relationship queries using compound indices.

MySQL Common Table Expressions with Eloquent and Laravel

MySQL Common Table Expressions with Eloquent and Laravel

Using CTE in your Project

Common Table Expressions are incredibly useful in MySQL 8. However, Laravel does not support it out of the box. Let's see how we can use a package to support this.

Laravel: Creating Many to Many Relationships - The Definitive Guide

Laravel: Creating Many to Many Relationships - The Definitive Guide

Taking full advantage of all the built-in functionality

The article includes the best way to understand a many to many relationship and write a migration.