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!
The Laravel portal for problem solving, knowledge sharing and community building.
The community