© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
6 replies
Roland Barkóczi

Policy depends on request path

Hello All,

I have the following problem:
I have a [event] resource and the resource view page have a couple of relations (eg. attendees, vendors, etc).

I want to add policies to these relations, but to determine if the given user has access to an operation I need the event id {record}.

I tried to reach the request route parameter (request()->route()->parameter('record');), it works, but when I change tab, the livewire call (livewire/update) behind the scene refresh the data and the given operation will be refused due to the livewire call does not have the {record} parameter in the url .

As a workaround I thought to save the event_id to a session variable, but this will cause a problem when a user have multiple browser window with different event to view.

Question how can I reach an URL parameter and make it available for the subsequent livewire calls?
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

hidden field depends on current page
FilamentFFilament / ❓┊help
2y ago
Table custom query, where from request path.
FilamentFFilament / ❓┊help
2y ago
Hide Select Dropdown depends on the Select Dropdown value?
FilamentFFilament / ❓┊help
2y ago
Authorization/Policy on an entire cluster
FilamentFFilament / ❓┊help
13mo ago