I am using the following code to append the query strings with two links. But I want to exclude the page parameter of pagination from the query string.
<li><a href="/teachers?{{ Request::getQueryString()}}">Teachers</a></li>
<li><a href="/courses?{{ Request::getQueryString()}}">Courses</a></li>
What is the way to do it? I tried the following code but it generates error.
<li><a href="/teachers?{{ Request::getQueryString()->except('page') }}">Teachers</a></li>
<li><a href="/courses?{{ Request::getQueryString()->except('page') }}">Courses</a></li>