© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
8 replies
Crylar

How to have Resource with custom route parameters?

Lets say I have Menus -> Categories relationship where one Menu has many Categories. I would love to limit a list of Categories to a specific Menu based on the parameter in the URL.


class CategoryResource extends Resource
{
    protected static ?string $model = Category::class;

    protected static bool $shouldRegisterNavigation = false;

    protected static ?string $slug = 'menus/{menu}/categories';
class CategoryResource extends Resource
{
    protected static ?string $model = Category::class;

    protected static bool $shouldRegisterNavigation = false;

    protected static ?string $slug = 'menus/{menu}/categories';


I am getting
Missing parameter: menu
Missing parameter: menu
error when trying to access resource via
/admin/menus/1/categories
/admin/menus/1/categories
url.

I do believe my additional route parameter gets missing from the getUrl generation for all other actions on the table.

Please advice.
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

Custom resource route with extra parameters
FilamentFFilament / ❓┊help
16mo ago
Custom route with path parameters for custom page
FilamentFFilament / ❓┊help
3y ago
How to have a custom route for new entry?
FilamentFFilament / ❓┊help
2y ago