© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago
Aethernaut

Return SimplePage as response for middleware exception?

I'm looking for the best/proper way to render a custom
SimplePage
SimplePage
class if middleware exception is thrown.

I've tried returning the
response()->view('path.to.simplepage.view')
response()->view('path.to.simplepage.view')
but receive an error
Using $this when not in object context
Using $this when not in object context
(presumably because the
<x-filament-panels::page.simple>
<x-filament-panels::page.simple>
is not getting initialized properly)

I've also tried:
return response()->view((new MyCustomSimplePage())->render())
return response()->view((new MyCustomSimplePage())->render())
but the same error is given.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Removing tenant parameter and middleware for SimplePage
FilamentFFilament / ❓┊help
3y ago
Return Exception from handleRecordCreation
FilamentFFilament / ❓┊help
11mo ago
Render SimplePage without route?
FilamentFFilament / ❓┊help
2y ago
SimplePage render custom view data?
FilamentFFilament / ❓┊help
2y ago