I found a workaround for this. Instead of:
@include('pages.search')
I changed the middleware to use a helper function and then called the helper function on a view:
{!! helperFunction(view('pages.search')) !!}
And everything seems to be working now, but am still curious as to why a 404 request isn't processed as an http request and subject to all the global http stack middleware.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community