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/367/9c57cfb2f2843dc64aaa6c97bad628af.png)](https://msaied.com/articles/advanced-eloquent-casts-custom-cast-classes-value-objects-and-inbound-only-transforms-1)5 Jul 2026·1 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-1) 

 Go beyond primitive casts. Learn to build custom Eloquent cast classes that hydrate value objects, handle inbound-only transforms, and keep your models clean without leaking domain logic into the database layer.

   [![](https://cdn.msaied.com/363/8e5685c14467b502c2bcbd62b4f47f64.png)](https://msaied.com/articles/postgresql-ctes-window-functions-and-lateral-joins-in-laravel-2)4 Jul 2026·3 min read 

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

 Go beyond basic Eloquent queries: learn how to harness PostgreSQL CTEs, window functions, and LATERAL joins directly from Laravel using raw expressions and query builder macros.

   [![](https://cdn.msaied.com/362/ecd807763e4e5019ee04875ba59dc8bc.png)](https://msaied.com/articles/eloquent-query-scopes-global-local-and-dynamic-scopes-without-the-magic-tax)4 Jul 2026·3 min read 

### [Eloquent Query Scopes: Global, Local, and Dynamic Scopes Without the Magic Tax](https://msaied.com/articles/eloquent-query-scopes-global-local-and-dynamic-scopes-without-the-magic-tax) 

 Query scopes are one of Eloquent's most misused features. This guide shows how to write global, local, and dynamic scopes that stay testable, composable, and free of hidden side-effects.

   [![](https://cdn.msaied.com/356/592e07bf3b46443cb950d9bb31725ba6.png)](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-schema-less-columns-done-right)3 Jul 2026·3 min read 

### [PostgreSQL JSONB in Laravel: Indexing, Querying, and Schema-less Columns Done Right](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-schema-less-columns-done-right) 

 JSONB columns can replace entire pivot tables or EAV nightmares — if you index them correctly and query through Eloquent without leaking raw SQL everywhere. Here is the practical playbook.

   [![](https://cdn.msaied.com/344/0e6a808cf916b40631d3d362a687baa8.png)](https://msaied.com/articles/php-83-typed-enums-backed-casts-and-readonly-properties-in-modern-laravel)2 Jul 2026·1 min read 

### [PHP 8.3+ Typed Enums, Backed Casts, and Readonly Properties in Modern Laravel](https://msaied.com/articles/php-83-typed-enums-backed-casts-and-readonly-properties-in-modern-laravel) 

 PHP 8.3 and Laravel's native enum support unlock expressive, type-safe domain models. Learn how to combine backed enums, custom Eloquent casts, and readonly properties to eliminate primitive obsession without ceremony.

   [![](https://cdn.msaied.com/341/e460f72ab8bb3d94f0646b12a73167cc.png)](https://msaied.com/articles/eloquent-custom-relations-building-a-hasmanythrough-alternative-with-query-builder)2 Jul 2026·1 min read 

### [Eloquent Custom Relations: Building a HasManyThrough Alternative with Query Builder](https://msaied.com/articles/eloquent-custom-relations-building-a-hasmanythrough-alternative-with-query-builder) 

 Standard Eloquent relations don't cover every schema. Learn how to build a fully functional custom relation class that integrates with eager loading, lazy loading, and query constraints.

   [![](https://cdn.msaied.com/334/7fd2cb3e1dda6c009d734cd376d14e36.png)](https://msaied.com/articles/profiling-laravel-with-blackfire-and-xdebug-finding-real-bottlenecks)1 Jul 2026·3 min read 

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

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

   [![](https://cdn.msaied.com/328/aeca4a50362c2e891a402fedf4635382.png)](https://msaied.com/articles/postgresql-full-text-search-in-laravel-indexes-ranking-and-multilingual-queries-1)30 Jun 2026·4 min read 

### [PostgreSQL Full-Text Search in Laravel: Indexes, Ranking, and Multilingual Queries](https://msaied.com/articles/postgresql-full-text-search-in-laravel-indexes-ranking-and-multilingual-queries-1) 

 Skip Algolia for most projects. PostgreSQL's built-in full-text search handles ranked queries, stemming, and multilingual dictionaries — all wired into Eloquent without a third-party service.

   [![](https://cdn.msaied.com/327/a63b6cb7e6fa83812746015ccb2ee7b7.png)](https://msaied.com/articles/mysql-optimization-for-laravel-covering-indexes-explain-analyze-and-query-profiling)30 Jun 2026·4 min read 

### [MySQL Optimization for Laravel: Covering Indexes, EXPLAIN ANALYZE, and Query Profiling](https://msaied.com/articles/mysql-optimization-for-laravel-covering-indexes-explain-analyze-and-query-profiling) 

 Stop guessing why your Laravel app slows down under load. Learn how to read EXPLAIN ANALYZE output, build covering indexes, and profile slow queries with real Eloquent examples.

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

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

  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)
