Articles | Mohamed Said      [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://msaied.com) - [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [About](https://msaied.com#about)

           [  Contact](https://msaied.com#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://msaied.com)
- [ProjectsCase studies](https://msaied.com/projects)
- [ArticlesEngineering notes](https://msaied.com/articles)
- [CertificatesCredentials](https://msaied.com/certificates)
- [AboutHow I work](https://msaied.com#about)
- [ContactGet in touch](https://msaied.com#contact)

  [Start a conversation](https://msaied.com#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

  1. [Home](https://msaied.com)
2. /
3. Articles

  Engineering library
====================

 100 articles by Mohamed Said on Laravel, PHP, databases, APIs and infrastructure, written from production work.

 Search articles ⌕×Search 

    Topic hubs
----------

←→

- [AI53 articles](https://msaied.com/articles?category=ai&search=eloquent&sort=new)
- [Composer Pacakge85 articles](https://msaied.com/articles?category=composer-pacakge&search=eloquent&sort=new)
- [Filament31 articles](https://msaied.com/articles?category=filament&search=eloquent&sort=new)
- [Laravel292 articles](https://msaied.com/articles?category=laravel&search=eloquent&sort=new)
- [Livewire16 articles](https://msaied.com/articles?category=livewire&search=eloquent&sort=new)
- [Open Source48 articles](https://msaied.com/articles?category=open-source&search=eloquent&sort=new)
- [PHP34 articles](https://msaied.com/articles?category=php&search=eloquent&sort=new)
- [Tips &amp; Tricks37 articles](https://msaied.com/articles?category=tips-tricks&search=eloquent&sort=new)

  Topics
------

 [All topics](https://msaied.com/articles?search=eloquent&sort=new) [AI 53](https://msaied.com/articles?category=ai&search=eloquent&sort=new) [Composer Pacakge 85](https://msaied.com/articles?category=composer-pacakge&search=eloquent&sort=new) [Filament 31](https://msaied.com/articles?category=filament&search=eloquent&sort=new) [Laravel 292](https://msaied.com/articles?category=laravel&search=eloquent&sort=new) [Livewire 16](https://msaied.com/articles?category=livewire&search=eloquent&sort=new) [Open Source 48](https://msaied.com/articles?category=open-source&search=eloquent&sort=new) [PHP 34](https://msaied.com/articles?category=php&search=eloquent&sort=new) [Tips &amp; Tricks 37](https://msaied.com/articles?category=tips-tricks&search=eloquent&sort=new)    100 articles
-------------

Topics    Sort articles Newest first  Oldest first  Sort  

 [Search: eloquent ×Remove search](https://msaied.com/articles?sort=new) [ Clear filters](https://msaied.com/articles) 

  [![](https://cdn.msaied.com/495/f4be5a97b9eba9d16cce791cca64bd80.png)](https://msaied.com/articles/cursor-pagination-lazy-collections-and-chunked-iteration-at-scale-in-laravel-1)1 Aug 2026·4 min read 

### [Cursor Pagination, Lazy Collections, and Chunked Iteration at Scale in Laravel](https://msaied.com/articles/cursor-pagination-lazy-collections-and-chunked-iteration-at-scale-in-laravel-1) 

 Offset pagination breaks under large datasets. Learn when to reach for cursor pagination, lazy collections, and chunked iteration — and how each interacts with Eloquent, memory, and your database query plan.

   [![](https://cdn.msaied.com/483/0b80ca4c39b98b48f8d3475ac949ea0f.png)](https://msaied.com/articles/laravel-typed-enums-as-first-class-citizens-casts-rules-and-php-83-features)29 Jul 2026·3 min read 

### [Laravel Typed Enums as First-Class Citizens: Casts, Rules, and PHP 8.3 Features](https://msaied.com/articles/laravel-typed-enums-as-first-class-citizens-casts-rules-and-php-83-features) 

 PHP 8.1 enums changed how we model domain state. This article shows how to wire backed enums into Eloquent casts, form validation rules, and route binding — with PHP 8.3 typed constants making everything tighter.

   [![](https://cdn.msaied.com/480/c7d2c0d0fd1823460fbdb138f77b573f.png)](https://msaied.com/articles/laravel-custom-eloquent-relations-building-polymorphic-and-composite-key-relations)28 Jul 2026·4 min read 

### [Laravel Custom Eloquent Relations: Building Polymorphic and Composite-Key Relations](https://msaied.com/articles/laravel-custom-eloquent-relations-building-polymorphic-and-composite-key-relations) 

 Eloquent's built-in relations cover 90% of cases, but composite-key joins and non-standard polymorphic pivots demand custom relation classes. Learn how to build them correctly.

   [![](https://cdn.msaied.com/479/d7c54bd7a42ee57610a29f19a2c5e0fa.png)](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-overhead)28 Jul 2026·4 min read 

### [PostgreSQL JSONB in Laravel: Indexing, Querying, and Casting Without the Overhead](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-overhead) 

 JSONB columns unlock flexible schemas, but misused they become performance sinkholes. This guide covers GIN indexes, containment operators, Eloquent casts, and query patterns that keep PostgreSQL fast.

   [![](https://cdn.msaied.com/476/2fe247e6705cd8624395e9194ff80703.png)](https://msaied.com/articles/laravel-api-resources-sparse-fieldsets-conditional-relationships-and-stable-contracts)27 Jul 2026·3 min read 

### [Laravel API Resources: Sparse Fieldsets, Conditional Relationships, and Stable Contracts](https://msaied.com/articles/laravel-api-resources-sparse-fieldsets-conditional-relationships-and-stable-contracts) 

 Go beyond basic transformers. Learn how to implement sparse fieldsets, conditionally load relationships, and enforce stable API contracts using Laravel's Eloquent API Resources — without leaking domain internals.

   [![](https://cdn.msaied.com/475/39c5bf23764003ebc9ac32d840752d49.png)](https://msaied.com/articles/eloquent-query-optimization-killing-n1-problems-at-the-source)27 Jul 2026·3 min read 

### [Eloquent Query Optimization: Killing N+1 Problems at the Source](https://msaied.com/articles/eloquent-query-optimization-killing-n1-problems-at-the-source) 

 N+1 queries silently destroy Laravel app performance. This guide shows senior engineers how to detect, eliminate, and prevent them using eager loading strategies, query analysis, and Eloquent best practices.

   [![](https://cdn.msaied.com/473/5b2261450fb7c3c68870997e338c2e1b.png)](https://msaied.com/articles/profiling-laravel-with-blackfire-and-xdebug-finding-real-bottlenecks-1)26 Jul 2026·4 min read 

### [Profiling Laravel with Blackfire and Xdebug: Finding Real Bottlenecks](https://msaied.com/articles/profiling-laravel-with-blackfire-and-xdebug-finding-real-bottlenecks-1) 

 Stop guessing where your Laravel app is slow. Learn how to use Blackfire and Xdebug profilers together to pinpoint real bottlenecks in Eloquent queries, service resolution, and middleware stacks.

   [![](https://cdn.msaied.com/446/a05febe70b72107387f210e0f9eae089.png)](https://msaied.com/articles/cqrs-in-laravel-without-a-framework-commands-handlers-and-read-models-that-stay-lean)20 Jul 2026·1 min read 

### [CQRS in Laravel Without a Framework: Commands, Handlers, and Read Models That Stay Lean](https://msaied.com/articles/cqrs-in-laravel-without-a-framework-commands-handlers-and-read-models-that-stay-lean) 

 Skip the heavy event-sourcing libraries. This guide shows how to implement a practical CQRS layer in Laravel using plain PHP classes, the service container, and Eloquent read models — without framework tax.

   [![](https://cdn.msaied.com/445/b4f83e0b5da7c11e2fe942eebc1cad08.png)](https://msaied.com/articles/laravel-event-sourcing-projections-snapshots-and-replay-without-the-framework-tax)19 Jul 2026·4 min read 

### [Laravel Event Sourcing: Projections, Snapshots, and Replay Without the Framework Tax](https://msaied.com/articles/laravel-event-sourcing-projections-snapshots-and-replay-without-the-framework-tax) 

 Event sourcing in Laravel without a heavy framework. Build lean projectors, snapshot aggregates at scale, and replay history safely — using plain PHP classes and Eloquent.

   [← Newer](https://msaied.com/articles?search=eloquent&page=5)1. [1](https://msaied.com/articles?search=eloquent&page=1)
2. [2](https://msaied.com/articles?search=eloquent&page=2)
3. [3](https://msaied.com/articles?search=eloquent&page=3)
4. [4](https://msaied.com/articles?search=eloquent&page=4)
5. [5](https://msaied.com/articles?search=eloquent&page=5)
6. 6
7. [7](https://msaied.com/articles?search=eloquent&page=7)
8. [8](https://msaied.com/articles?search=eloquent&page=8)
9. [9](https://msaied.com/articles?search=eloquent&page=9)
10. [10](https://msaied.com/articles?search=eloquent&page=10)
11. [11](https://msaied.com/articles?search=eloquent&page=11)
12. [12](https://msaied.com/articles?search=eloquent&page=12)

 6 / 12 [Older →](https://msaied.com/articles?search=eloquent&page=7)   

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://msaied.com#contact) 

Topics
------

Close 

 [All topics](https://msaied.com/articles) [AI (53) ](https://msaied.com/articles?category=ai&search=eloquent&sort=new) [Composer Pacakge (85) ](https://msaied.com/articles?category=composer-pacakge&search=eloquent&sort=new) [Filament (31) ](https://msaied.com/articles?category=filament&search=eloquent&sort=new) [Laravel (292) ](https://msaied.com/articles?category=laravel&search=eloquent&sort=new) [Livewire (16) ](https://msaied.com/articles?category=livewire&search=eloquent&sort=new) [Open Source (48) ](https://msaied.com/articles?category=open-source&search=eloquent&sort=new) [PHP (34) ](https://msaied.com/articles?category=php&search=eloquent&sort=new) [Tips &amp; Tricks (37) ](https://msaied.com/articles?category=tips-tricks&search=eloquent&sort=new)  

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://msaied.com)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://msaied.com/sitemap.xml)
