---
title: "#eloquent articles | Hashnode"
description: "Explore 72 articles tagged #eloquent on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/eloquent"
---

Tag

# #eloquent

72 posts · 7 followers

[Bohdan Chyriukin](https://hashnode.com/@chirukinbb) · [Aug 4](https://hashnode.com/posts/how-to-boost-eloquent-performance-without-raw-sql-from-n-1-to-deep-optimization/6a721bac41706b5998527e03)

### [How to Boost Eloquent Performance Without Raw SQL: From N+1 to Deep Optimization](https://chikukinbb.hashnode.dev/how-to-boost-eloquent-performance-without-raw-sql-from-n-1-to-deep-optimization?utm_source=hashnode&utm_medium=feed)

Learn how to optimize Laravel Eloquent without Raw SQL. Fix N+1 queries, use withCount, exists, addSelect, chunkById, lazy and cursor effectively.

8 min read · [chikukinbb.hashnode.dev](https://chikukinbb.hashnode.dev/how-to-boost-eloquent-performance-without-raw-sql-from-n-1-to-deep-optimization?utm_source=hashnode&utm_medium=feed)

[Deploynix](https://hashnode.com/@deploynix) · [Apr 25](https://hashnode.com/posts/n1-query-detection-and-prevention-in-laravel-production-apps/69ec8297901edfa24b58f5fd)

### [N+1 Query Detection and Prevention in Laravel Production Apps](https://deploynix.hashnode.dev/n1-query-detection-and-prevention-in-laravel-production-apps?utm_source=hashnode&utm_medium=feed)

The N+1 query problem is the most common performance issue in Laravel applications, and it's the easiest to introduce accidentally. A developer adds $post->author->name in a Blade template, and suddenly a page that loaded 10 posts now executes 11 dat...

8 min read · [deploynix.hashnode.dev](https://deploynix.hashnode.dev/n1-query-detection-and-prevention-in-laravel-production-apps?utm_source=hashnode&utm_medium=feed)

[Nishil Bhave](https://hashnode.com/@nishilbhave) · [Mar 28](https://hashnode.com/posts/php-81-enums-backed-enums-and-laravel-eloquent-casts/69c849b97780190b9b62ae4f)

### [PHP 8.1 Enums: Backed Enums and Laravel Eloquent Casts](https://nishilbhave.hashnode.dev/php-81-enums-backed-enums-and-laravel-eloquent-casts?utm_source=hashnode&utm_medium=feed)

PHP 8.1 Enums: Backed Enums and Laravel Eloquent Casts PHP enums landed in version 8.1, and they've quietly become one of the most adopted features across the ecosystem. With 85.9% of Packagist users now running PHP 8.x (Stitcher.io, June 2026), ther...

17 min read · [nishilbhave.hashnode.dev](https://nishilbhave.hashnode.dev/php-81-enums-backed-enums-and-laravel-eloquent-casts?utm_source=hashnode&utm_medium=feed)

[Prajapati Paresh](https://hashnode.com/@iprajapatiparesh) · [Mar 18](https://hashnode.com/posts/eloquent-n1-query-optimization-laravel/69ba2fb5c22d3eeb8a326b27)

### [Why Eloquent is Silently Killing Your Laravel App's Performance](https://smarttechdevs.hashnode.dev/eloquent-n1-query-optimization-laravel?utm_source=hashnode&utm_medium=feed)

The ORM Illusion Laravel's Eloquent ORM is a masterpiece of developer experience. Being able to type $user->invoices->first()->amount and magically get a value without writing a single line of SQL fee

2 min read · [smarttechdevs.hashnode.dev](https://smarttechdevs.hashnode.dev/eloquent-n1-query-optimization-laravel?utm_source=hashnode&utm_medium=feed)

[recca0120](https://hashnode.com/@recca0120) · [Mar 8](https://hashnode.com/posts/laravel-eloquent-memory-leak-1/69add98abc4378bf8e67b287)

### [Fix Laravel Eloquent Memory Leak with Large Datasets](https://recca0120.hashnode.dev/laravel-eloquent-memory-leak-1?utm_source=hashnode&utm_medium=feed)

Eloquent caches loaded relations on every Model instance, causing memory to climb in large loops. Call setRelations(\[\]) on each iteration to release the cache.

1 min read · [recca0120.hashnode.dev](https://recca0120.hashnode.dev/laravel-eloquent-memory-leak-1?utm_source=hashnode&utm_medium=feed)

[recca0120](https://hashnode.com/@recca0120) · [Mar 8](https://hashnode.com/posts/eloquent-macro-fire-event-1/69add9749a79a5b0bff051b7)

### [Eloquent Macro: Fire Specific Events After saveQuietly](https://recca0120.hashnode.dev/eloquent-macro-fire-event-1?utm_source=hashnode&utm_medium=feed)

Save a model silently with saveQuietly, then selectively dispatch created or other Eloquent model events via a custom Builder macro fire method in Laravel.

2 min read · [recca0120.hashnode.dev](https://recca0120.hashnode.dev/eloquent-macro-fire-event-1?utm_source=hashnode&utm_medium=feed)

[Rohit Dhiman](https://hashnode.com/@rohitdhiman91) · [Mar 6](https://hashnode.com/posts/introduction-to-eloquent-orm-in-laravel/69aab5c578c5adcd0e0239da)

### [Introduction to Eloquent ORM in Laravel](https://rohitdhiman91.hashnode.dev/introduction-to-eloquent-orm-in-laravel?utm_source=hashnode&utm_medium=feed)

Laravel’s Eloquent ORM makes database queries readable, simple, and developer-friendly.

4 min read · [rohitdhiman91.hashnode.dev](https://rohitdhiman91.hashnode.dev/introduction-to-eloquent-orm-in-laravel?utm_source=hashnode&utm_medium=feed)

[Birendra Gurung](https://hashnode.com/@birendra007) · [Jan 6](https://hashnode.com/posts/fixing-phpstan-map-type-errors-with-laravel-eloquent-collections/695cc19ad4755babb32166ea)

### [Fixing PHPStan map() Type Errors with Laravel Eloquent Collections](https://blog.jobins.jp/fixing-phpstan-map-type-errors-with-laravel-eloquent-collections?utm_source=hashnode&utm_medium=feed)

Learn how to fix PHPStan type errors in Laravel collections using proper Eloquent relationship annotations and method typing

3 min read · [blog.jobins.jp](https://blog.jobins.jp/fixing-phpstan-map-type-errors-with-laravel-eloquent-collections?utm_source=hashnode&utm_medium=feed)

[Amindu Saputhanthri](https://hashnode.com/@aminduishara) · [Dec 7, 2025](https://hashnode.com/posts/eloquent-performance/6935411cc9cf3c9a04986b81)

### [Eloquent Performance](https://aminduishara.hashnode.dev/eloquent-performance?utm_source=hashnode&utm_medium=feed)

Optimizing Queries Before You Need Cache

4 min read · [aminduishara.hashnode.dev](https://aminduishara.hashnode.dev/eloquent-performance?utm_source=hashnode&utm_medium=feed)

[Rohit Dhiman](https://hashnode.com/@rohitdhiman91) · [Aug 6, 2025](https://hashnode.com/posts/laravel-tinker-your-best-friend-for-testing-learning-and-debugging/6892da745f9cb41504980f13)

### [Laravel Tinker: Your Best Friend for Testing, Learning, and Debugging](https://rohitdhiman91.hashnode.dev/laravel-tinker-your-best-friend-for-testing-learning-and-debugging?utm_source=hashnode&utm_medium=feed)

Laravel Tinker completely changed how I test and learn Laravel - here’s why it should be your best friend too

3 min read · [rohitdhiman91.hashnode.dev](https://rohitdhiman91.hashnode.dev/laravel-tinker-your-best-friend-for-testing-learning-and-debugging?utm_source=hashnode&utm_medium=feed)
