Support the ongoing development of →
Requests IOC
Last updated 2 years ago.

I managed this with the RedirectResponse just by creating my classes that extend \Illuminate\Http\RedirectResponse and \Illuminate\Routing\Redirector then just registering that in my own service provider.

For the service provider I just copied how laravel done it in \Illuminate\Routing\RoutingServiceProvider@registerRedirector and dropped in my own classes where needed.

I suspect you can use a similar method to extend the Request and Route classes.


The request is first created in index.php. I haven't completely wrapped my head around how the class resolver works, so there could be a better way, but I was able to just change the class here.


Sign in to participate in this thread!


Your banner here too?

findstar findstar Joined 13 Apr 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.