Custom page before list resource

I need to add a custom page before listing a resource. I tried something like this:

public static function getPages(): array
{
    return [
        'index' => FactoriesListPage::route('/factories'),
        'list' => ListProducts::route('/factory/{factory}'),
        'create' => CreateProduct::route('/create'),
        'edit' => EditProduct::route('/{record}/edit'),
    ];
}


I want a page to select a factory and, after a factory is selected, list the products where the factory matches the selected one.


What is the best approach to this?
Was this page helpful?