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
====================

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

 Search articles ⌕×Search 

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

←→

- [AI48 articles](https://msaied.com/articles?category=ai&search=macros&sort=new)
- [Composer Pacakge81 articles](https://msaied.com/articles?category=composer-pacakge&search=macros&sort=new)
- [Filament27 articles](https://msaied.com/articles?category=filament&search=macros&sort=new)
- [Laravel267 articles](https://msaied.com/articles?category=laravel&search=macros&sort=new)
- [Livewire13 articles](https://msaied.com/articles?category=livewire&search=macros&sort=new)
- [Open Source44 articles](https://msaied.com/articles?category=open-source&search=macros&sort=new)
- [PHP27 articles](https://msaied.com/articles?category=php&search=macros&sort=new)
- [Tips &amp; Tricks32 articles](https://msaied.com/articles?category=tips-tricks&search=macros&sort=new)

  Topics
------

 [All topics](https://msaied.com/articles?search=macros&sort=new) [AI 48](https://msaied.com/articles?category=ai&search=macros&sort=new) [Composer Pacakge 81](https://msaied.com/articles?category=composer-pacakge&search=macros&sort=new) [Filament 27](https://msaied.com/articles?category=filament&search=macros&sort=new) [Laravel 267](https://msaied.com/articles?category=laravel&search=macros&sort=new) [Livewire 13](https://msaied.com/articles?category=livewire&search=macros&sort=new) [Open Source 44](https://msaied.com/articles?category=open-source&search=macros&sort=new) [PHP 27](https://msaied.com/articles?category=php&search=macros&sort=new) [Tips &amp; Tricks 32](https://msaied.com/articles?category=tips-tricks&search=macros&sort=new)    12 articles
------------

Topics    Sort articles Newest first  Oldest first  Sort  

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

  [![](https://cdn.msaied.com/663/b8e39b17d427358aa43b5c3e8c1be908.png)](https://msaied.com/articles/macros-mixins-and-custom-collection-methods-in-laravel-2)13 Sep 2026·4 min read 

### [Macros, Mixins, and Custom Collection Methods in Laravel](https://msaied.com/articles/macros-mixins-and-custom-collection-methods-in-laravel-2) 

 Learn how to extend Laravel's core classes with macros, mixins, and custom Collection methods — keeping your codebase expressive without forking the framework.

   [![](https://cdn.msaied.com/658/b45c3cc06b92a332e526bed9bb1f826d.png)](https://msaied.com/articles/laravel-macro-free-extensibility-custom-query-builder-classes-and-fluent-scopes)11 Sep 2026·1 min read 

### [Laravel Macro-Free Extensibility: Custom Query Builder Classes and Fluent Scopes](https://msaied.com/articles/laravel-macro-free-extensibility-custom-query-builder-classes-and-fluent-scopes) 

 Skip global macros and reach for typed, testable custom query builder classes in Laravel. Learn how to bind a dedicated builder per model, compose fluent scopes, and keep your query logic discoverable.

   [![](https://cdn.msaied.com/621/b0c176a363378658e83bb44ed379879b.png)](https://msaied.com/articles/laravel-macro-free-extensibility-extending-eloquent-builder-with-custom-query-objects)2 Sep 2026·1 min read 

### [Laravel Macro-Free Extensibility: Extending Eloquent Builder with Custom Query Objects](https://msaied.com/articles/laravel-macro-free-extensibility-extending-eloquent-builder-with-custom-query-objects) 

 Skip global macros and reach for typed, testable query objects that encapsulate reusable Eloquent constraints — keeping your Builder clean and your domain logic explicit.

   [![](https://cdn.msaied.com/556/0c5a2892229d005cb3b747c868df5bb6.png)](https://msaied.com/articles/contextual-macros-and-mixins-extending-laravel-collections-without-bloat)16 Aug 2026·3 min read 

### [Contextual Macros and Mixins: Extending Laravel Collections Without Bloat](https://msaied.com/articles/contextual-macros-and-mixins-extending-laravel-collections-without-bloat) 

 Learn how to add domain-specific behaviour to Laravel's Collection class using macros, mixins, and higher-order proxies — keeping your codebase expressive without polluting global state.

   [![](https://cdn.msaied.com/442/b239b69e5a334711c8b4ca8804556c64.png)](https://msaied.com/articles/laravel-macros-mixins-and-custom-collection-methods-that-actually-ship-1)19 Jul 2026·3 min read 

### [Laravel Macros, Mixins, and Custom Collection Methods That Actually Ship](https://msaied.com/articles/laravel-macros-mixins-and-custom-collection-methods-that-actually-ship-1) 

 Go beyond toy examples: learn how to register macros safely, build reusable mixins, and add typed custom Collection methods that survive Octane restarts and static analysis.

   [![](https://cdn.msaied.com/372/b8e39b17d427358aa43b5c3e8c1be908.png)](https://msaied.com/articles/macros-mixins-and-custom-collection-methods-in-laravel-1)5 Jul 2026·3 min read 

### [Macros, Mixins, and Custom Collection Methods in Laravel](https://msaied.com/articles/macros-mixins-and-custom-collection-methods-in-laravel-1) 

 Learn how to extend Laravel's core classes with macros, mixins, and custom Collection methods — keeping your codebase expressive without forking the framework.

   [![](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/312/7bf5ac9ba3c8384848342d23b87fef21.png)](https://msaied.com/articles/extending-laravel-collections-macros-mixins-and-higher-order-proxies)28 Jun 2026·4 min read 

### [Extending Laravel Collections: Macros, Mixins, and Higher-Order Proxies](https://msaied.com/articles/extending-laravel-collections-macros-mixins-and-higher-order-proxies) 

 Learn how to add domain-specific methods to Laravel's Collection class using macros, mixins, and higher-order proxies — without polluting your codebase with one-off helpers.

   [![](https://cdn.msaied.com/251/1879274587b94ac9ed89c7ccf6d75a64.png)](https://msaied.com/articles/macros-mixins-and-custom-collection-methods-in-laravel)20 Jun 2026·3 min read 

### [Macros, Mixins, and Custom Collection Methods in Laravel](https://msaied.com/articles/macros-mixins-and-custom-collection-methods-in-laravel) 

 Learn how to extend Laravel's core classes with macros, mixins, and custom Collection methods — without monkey-patching or bloating service providers.

   ← Newer1. 1
2. [2](https://msaied.com/articles?search=macros&page=2)

 1 / 2 [Older →](https://msaied.com/articles?search=macros&page=2)   

  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 (48) ](https://msaied.com/articles?category=ai&search=macros&sort=new) [Composer Pacakge (81) ](https://msaied.com/articles?category=composer-pacakge&search=macros&sort=new) [Filament (27) ](https://msaied.com/articles?category=filament&search=macros&sort=new) [Laravel (267) ](https://msaied.com/articles?category=laravel&search=macros&sort=new) [Livewire (13) ](https://msaied.com/articles?category=livewire&search=macros&sort=new) [Open Source (44) ](https://msaied.com/articles?category=open-source&search=macros&sort=new) [PHP (27) ](https://msaied.com/articles?category=php&search=macros&sort=new) [Tips &amp; Tricks (32) ](https://msaied.com/articles?category=tips-tricks&search=macros&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)
