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

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

 Search articles ⌕×Search 

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

←→

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

  Topics
------

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

Topics    Sort articles Newest first  Oldest first  Sort  

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

  [![](https://cdn.msaied.com/821/88459f9998da0239229cdbcb6f7daa6c.png)](https://msaied.com/articles/insert-middleware-before-or-after-existing-laravel-middleware-laravel-1340)6 Nov 2026·3 min read 

### [Insert Middleware Before or After Existing Laravel Middleware (Laravel 13.40)](https://msaied.com/articles/insert-middleware-before-or-after-existing-laravel-middleware-laravel-1340) 

 Laravel 13.40 adds insertBefore(), insertAfter(), insertBeforeInGroup(), and insertAfterInGroup() so you can place custom middleware at an exact position in the global stack or a middleware group without redefining the whole list.

 [Laravel](https://msaied.com/articles?category=laravel) [Tips &amp; Tricks](https://msaied.com/articles?category=tips-tricks) 

   [![](https://cdn.msaied.com/403/de77e3b8105eafebfdc14a4cc06089a4.png)](https://msaied.com/articles/intercept-middleware-guardrails-for-laravel-ai-agents)8 Jul 2026·3 min read 

### [Intercept: Middleware Guardrails for Laravel AI Agents](https://msaied.com/articles/intercept-middleware-guardrails-for-laravel-ai-agents) 

 Intercept brings the familiar Laravel middleware pattern to AI agent prompts, letting you inspect, rewrite, or reject requests before they reach an external model. It ships with prompt injection detection and PII redaction out of the box.

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

  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 (52) ](https://msaied.com/articles?category=ai&search=Laravel%20Middleware&sort=new) [Composer Pacakge (85) ](https://msaied.com/articles?category=composer-pacakge&search=Laravel%20Middleware&sort=new) [Filament (31) ](https://msaied.com/articles?category=filament&search=Laravel%20Middleware&sort=new) [Laravel (290) ](https://msaied.com/articles?category=laravel&search=Laravel%20Middleware&sort=new) [Livewire (16) ](https://msaied.com/articles?category=livewire&search=Laravel%20Middleware&sort=new) [Open Source (48) ](https://msaied.com/articles?category=open-source&search=Laravel%20Middleware&sort=new) [PHP (34) ](https://msaied.com/articles?category=php&search=Laravel%20Middleware&sort=new) [Tips &amp; Tricks (37) ](https://msaied.com/articles?category=tips-tricks&search=Laravel%20Middleware&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)
