title: Next js - Call a function on server side each time a route is changed
body: <p>I am moving an old stack to next js and i need some help. </p>
  
  <p>I have a php backend and I want to check a controller from this backend each time a route is changed, and I want to do it on server side. </p>
  
  <p>For changing route, I use <code>Link</code> of <code>next-routes</code>, which have an effect only on the client side. </p>
  
  <p>Is there any way I can call the controller on server-side without refreshing the app?</p>