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

 14 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=collections&sort=new)
- [Composer Pacakge81 articles](https://msaied.com/articles?category=composer-pacakge&search=collections&sort=new)
- [Filament27 articles](https://msaied.com/articles?category=filament&search=collections&sort=new)
- [Laravel267 articles](https://msaied.com/articles?category=laravel&search=collections&sort=new)
- [Livewire13 articles](https://msaied.com/articles?category=livewire&search=collections&sort=new)
- [Open Source44 articles](https://msaied.com/articles?category=open-source&search=collections&sort=new)
- [PHP27 articles](https://msaied.com/articles?category=php&search=collections&sort=new)
- [Tips &amp; Tricks32 articles](https://msaied.com/articles?category=tips-tricks&search=collections&sort=new)

  Topics
------

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

Topics    Sort articles Newest first  Oldest first  Sort  

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

  [![](https://cdn.msaied.com/756/69efdf9ac9ec1e1f61378055f1cd6e92.png)](https://msaied.com/articles/eloquent-at-scale-chunked-iteration-lazy-collections-and-cursor-pagination)9 Oct 2026·4 min read 

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

 Processing large Eloquent result sets without exhausting memory requires choosing the right tool. This article breaks down chunk(), lazy(), lazyById(), and cursor pagination so you can make informed decisions under real production load.

   [![](https://cdn.msaied.com/645/3bcda55cd0d9e4e9b4be38c9b3d11ea4.png)](https://msaied.com/articles/chunked-iteration-lazy-collections-and-cursor-pagination-at-scale-in-laravel)8 Sep 2026·4 min read 

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

 Processing millions of Eloquent rows without exhausting memory requires the right tool for the job. Learn when to reach for chunk(), lazy(), lazyById(), and cursor pagination — and the subtle traps each one hides.

   [![](https://cdn.msaied.com/622/59bd72aa94848dfb195df6dcfb498e43.png)](https://msaied.com/articles/collections-chunkby-and-storage-path-hardening-in-laravel-1330)1 Sep 2026·3 min read 

### [Collections chunkBy() and Storage Path Hardening in Laravel 13.30](https://msaied.com/articles/collections-chunkby-and-storage-path-hardening-in-laravel-1330) 

 Laravel 13.30 ships chunkBy() for grouping adjacent collection items, closes a path-traversal gap in Storage::path(), and prints queue worker stop reasons directly in console output.

 [Laravel](https://msaied.com/articles?category=laravel) 

   [![](https://cdn.msaied.com/618/d246f1cbcb9f9cd71afa1415b2329b51.png)](https://msaied.com/articles/compoships-eloquent-relationships-on-multiple-columns-in-laravel)1 Sep 2026·3 min read 

### [Compoships: Eloquent Relationships on Multiple Columns in Laravel](https://msaied.com/articles/compoships-eloquent-relationships-on-multiple-columns-in-laravel) 

 Compoships lets you define Eloquent relationships, composite primary keys, and queue-safe collections across multiple columns — solving the eager-loading pitfall that breaks plain where() workarounds.

 [Laravel](https://msaied.com/articles?category=laravel) [Composer Pacakge](https://msaied.com/articles?category=composer-pacakge) 

   [![](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/536/3aab48ef4a4eaa26a3267637dc2ec8c7.png)](https://msaied.com/articles/cursor-pagination-and-lazy-collections-at-scale-in-laravel)11 Aug 2026·3 min read 

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

 Offset pagination breaks under large datasets. Learn how Laravel's cursor pagination and lazy collections let you iterate millions of rows without blowing memory or killing query performance.

   [![](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/415/eb2d62822119280148e092d25b36c6ae.png)](https://msaied.com/articles/cursor-pagination-chunked-iteration-and-lazy-collections-at-scale-in-laravel-2)12 Jul 2026·4 min read 

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

 Offset pagination breaks under large datasets. Learn how cursor pagination, chunked iteration, and lazy collections each solve different scale problems in Laravel Eloquent — with real query trade-offs explained.

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

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

 Offset pagination breaks under large datasets. Learn how cursor pagination, chunked iteration, and lazy collections work under the hood in Laravel — and when to reach for each one.

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

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