pretty simple request. i have a search box on the front-end page that submits to the controller. the controller does the search and returns the results. all is good and working.
however, i’d like to be able to append the string “#searchId” to the URL so the search page scrolls to the ID selector of the html element.
can i append from the controller? or do i have to do some logic in the routes?
when i click the search button, it appends the query to the URL:

i just wan to be able to append so the URL looks like: localhost:8080/xxx/resources?q=hello#searchID
controller code looks like this:
return function ( $page ) {
$query = get(‘q’);
$items = $page->children()->listed();
if( $query != null && !empty( $query )){
// search by title and tags for individual resource
$items = $items->search( $query, 'title|previewtitle|tags' );
}
$results = $items->paginate( 10 );
return [
'query' => $query,
'childpages' => $results,
'pagination' => $results->pagination()
];
};