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/326/a448cf24db292d3a7d1ff86ddbb44f1a.png)](https://msaied.com/articles/multi-tenant-saas-in-laravel-isolating-tenant-state-with-scoped-service-bindings)30 Jun 2026·3 min read 

### [Multi-Tenant SaaS in Laravel: Isolating Tenant State with Scoped Service Bindings](https://msaied.com/articles/multi-tenant-saas-in-laravel-isolating-tenant-state-with-scoped-service-bindings) 

 Scoped container bindings let you resolve a fresh tenant context per request without global state leakage. Learn how to wire tenant resolution, scope Eloquent models, and keep Filament panels clean across tenants.

   [![](https://cdn.msaied.com/311/73c2aa4cf4d7c33e5903eaa8ede1309d.png)](https://msaied.com/articles/filament-at-scale-multi-panel-auth-custom-panels-and-table-query-tuning-1)28 Jun 2026·4 min read 

### [Filament at Scale: Multi-Panel Auth, Custom Panels, and Table Query Tuning](https://msaied.com/articles/filament-at-scale-multi-panel-auth-custom-panels-and-table-query-tuning-1) 

 Running Filament across multiple panels with distinct auth guards and thousands of table rows? This guide covers custom panel providers, per-panel middleware, and Eloquent query tuning to keep every panel fast.

   [![](https://cdn.msaied.com/307/d9832b90141b009f63e8e55ea856cb3a.png)](https://msaied.com/articles/advanced-eloquent-casts-custom-cast-classes-value-objects-and-inbound-only-transforms)27 Jun 2026·4 min read 

### [Advanced Eloquent Casts: Custom Cast Classes, Value Objects, and Inbound-Only Transforms](https://msaied.com/articles/advanced-eloquent-casts-custom-cast-classes-value-objects-and-inbound-only-transforms) 

 Go beyond built-in Eloquent casts. Learn to build custom cast classes, wrap primitives in value objects, and apply inbound-only transforms — keeping your models clean without leaking domain logic into the database layer.

   [![](https://cdn.msaied.com/303/bbdbe4ee10b30fa9dfecef00698a1c9f.png)](https://msaied.com/articles/postgresql-ctes-window-functions-and-lateral-joins-in-laravel-1)27 Jun 2026·4 min read 

### [PostgreSQL CTEs, Window Functions, and Lateral Joins in Laravel](https://msaied.com/articles/postgresql-ctes-window-functions-and-lateral-joins-in-laravel-1) 

 Go beyond basic Eloquent queries. Learn how to harness PostgreSQL CTEs, window functions, and LATERAL joins directly from Laravel to solve real analytical and hierarchical data problems.

   [![](https://cdn.msaied.com/302/40500f25f8a29e6cd6eac4938f7211d0.png)](https://msaied.com/articles/eloquent-n1-at-scale-eager-loading-strategies-subquery-selects-and-lazy-eager-loading)27 Jun 2026·4 min read 

### [Eloquent N+1 at Scale: Eager Loading Strategies, Subquery Selects, and Lazy Eager Loading](https://msaied.com/articles/eloquent-n1-at-scale-eager-loading-strategies-subquery-selects-and-lazy-eager-loading) 

 N+1 queries silently kill throughput in production. This guide goes beyond basic with() calls to cover subquery selects, lazy eager loading, and when to abandon Eloquent relations entirely.

   [![](https://cdn.msaied.com/282/71a8fc3e4cf4239b1bf6d38d57e0b985.png)](https://msaied.com/articles/typed-enums-as-first-class-domain-citizens-in-laravel-with-php-83)24 Jun 2026·3 min read 

### [Typed Enums as First-Class Domain Citizens in Laravel with PHP 8.3](https://msaied.com/articles/typed-enums-as-first-class-domain-citizens-in-laravel-with-php-83) 

 Go beyond simple enum labels. Learn how to attach behaviour, implement interfaces, and use backed enums as Eloquent casts, route bindings, and validation rules without polluting your models.

   [![](https://cdn.msaied.com/279/2ec9eec2d01575b831b7a9230b2ffd06.png)](https://msaied.com/articles/eloquent-without-the-magic-custom-relations-and-query-builder-internals)24 Jun 2026·4 min read 

### [Eloquent Without the Magic: Custom Relations and Query Builder Internals](https://msaied.com/articles/eloquent-without-the-magic-custom-relations-and-query-builder-internals) 

 Go beyond hasMany and belongsTo. Learn how Eloquent relations are built internally, write a custom relation class from scratch, and tap the query builder directly for complex joins without sacrificing type safety.

   [![](https://cdn.msaied.com/278/4614d18b4735498f765593b468cbe591.png)](https://msaied.com/articles/eloquent-query-scopes-at-scale-global-local-and-pending-scope-internals)24 Jun 2026·2 min read 

### [Eloquent Query Scopes at Scale: Global, Local, and Pending Scope Internals](https://msaied.com/articles/eloquent-query-scopes-at-scale-global-local-and-pending-scope-internals) 

 Go beyond basic where() calls. Learn how Eloquent's scope pipeline works internally, when global scopes silently break joins, and how to write composable local scopes that stay testable under load.

   [![](https://cdn.msaied.com/266/81a05f630d54004d2a6689a02d6f0579.png)](https://msaied.com/articles/laravel-enums-as-first-class-domain-citizens-typed-casts-backed-values-and-behaviour)22 Jun 2026·1 min read 

### [Laravel Enums as First-Class Domain Citizens: Typed Casts, Backed Values, and Behaviour](https://msaied.com/articles/laravel-enums-as-first-class-domain-citizens-typed-casts-backed-values-and-behaviour) 

 PHP 8.1 backed enums are more than constants. Learn how to attach behaviour, use them as Eloquent casts, embed them in value objects, and write expressive domain logic without a single string literal.

   [← Newer](https://msaied.com/articles?search=eloquent&page=8)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](https://msaied.com/articles?search=eloquent&page=6)
7. [7](https://msaied.com/articles?search=eloquent&page=7)
8. [8](https://msaied.com/articles?search=eloquent&page=8)
9. 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)

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

  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)
