I’m wondering if it’s possible to define a route pattern that is build with variables?
I would like to use:
'pattern' => option('news_page_id') . '/(:any)'
…instead of:
'pattern' => 'aktuelles/(:any)',
'language' => '*',
'action' => function($language, $articleUid) {
$article = page(option('news_page_id'))->children()->filter(function ($newsPageArticle) {
return $newsPageArticle->uid() === $articleUid;
});
return $article;
}