Laravel middleware for prerendering javascript-rendered pages on the fly for SEO