I make use of ‘Filtering via routes’. This outputs for example:
/solutions/branche:healthcare
/solutions/branche:fintech
I was wondering if it is possible to change this somehow to:
/solutions/?branche=healthcare
/solutions/?branche=fintech
I make use of the following route:
'routes' => [
[
'pattern' => 'solutions/branche/(:any)',
'action' => function ($branche) {
return page('solutions')->render([
'branche' => $branche
]);
}
],
And controller:
<?php
return function ($page, $branche) {
$articles = $page->children()->listed();
if ($branche) {
$articles = $articles->filterBy('branchecategory', $branche, ',');
}
return [
'articles' => $articles
];
};
Thanks!