© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Hessam

Get extra parameters from URL for resources

Hello everyone

I have a nested resource.
In this way, I have a product resource that shows the list of products and I have made a list of attributes that shows the list of attribute according to the product ID, and you can also create or edit a new attribute for it.

And its url is as follows.

create url : /manager/product/attributes/{product}/create
edit url : /manager/product/attributes/{product}/{attribute}/edit

According to the product parameter in the url, I edited the getEloquent method and wrote it as follows.

public static function getTableQuery(): Builder
{
return parent::getEloquentQuery()
->where('attributeable_type', product()->model())
->where('attributeable_id', request('product'));
}

Now, when I add a delete action to the table, I get an error.
Because when removing the attribute, there is no product id parameter in the request.

This is because the deletion was done by the url related to livewire/update.


Keep this in mind, currently the creation and editing operation is working correctly as a page.

But there is an error in modal like the Delete operation.

Can someone tell me how I can keep this product parameter that is in the URL and use it in all situations?
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

Get parameter from URL
FilamentFFilament / ❓┊help
3y ago
Custom resource route with extra parameters
FilamentFFilament / ❓┊help
16mo ago
FileUpload on relation ( HasOne) extra parameters
FilamentFFilament / ❓┊help
17mo ago
How get data From url
FilamentFFilament / ❓┊help
3y ago