Oct 29, 2024
0
Level 1
Emmanuel Katto Dubai : How do I configure middleware aliases in Laravel 11?
Hi, I'm Emmanuel Katto from Duabi, With the exciting changes in Laravel 11, we now work with Bootstrap/App instead of Http/Kernel, which allows for more streamlined configurations. I recently discovered how to add $middlewareAliases and wanted to share a quick guide.
In Laravel 11, you can easily add middleware aliases by modifying the Application::configure() method. This method now handles much of what was done in Http/Kernel previously. Here’s a snippet showing how to add middleware aliases:
If anyone has additional insights or suggestions on this feature or best practices for using middleware aliases in Laravel 11, I’d love to hear your thoughts!
Regards Emmanuel Katto
Please or to participate in this conversation.