Blog
February 28, 2024
Customize Reset Password Mail in Laravel
Recently at my job, we encountered a feature that queues the reset password email, and I decided to create this post to demonstrate how easy it is to implement this and, at the same time, customize...
ReadJanuary 9, 2022
Creating a "what's hot" Reddit algorithm with Laravel
This is a small guide on how to implement a Reddit-style "what's hot" algorithm with Laravel Frameowrk. There are two primary benefits to using a "what's hot" algorithm. It gives newer posts a...
ReadSeptember 7, 2021
Refactoring to whereRelation method
Previously in Laravel when you wanted to get a relation and include an extra complex condition you had to do it with the whereHas
method in the following way:
Recently DarkGhostHunter...
September 2, 2021
Avoiding the N+1 problem in Laravel
Let's do some piggybacking on our code from Tip #1. Note how we fetch the User model for a given participant in the average function. This is highly problematic, because we're doing an additional...
Read