Return SimplePage as response for middleware exception?
I'm looking for the best/proper way to render a custom
SimplePage
class if middleware exception is thrown.
I've tried returning the response()->view('path.to.simplepage.view')
but receive an error Using $this when not in object context
(presumably because the <x-filament-panels::page.simple>
is not getting initialized properly)
I've also tried:
return response()->view((new MyCustomSimplePage())->render())
but the same error is given.0 Replies