Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

super_simon123's avatar

Render external HTML in Blade template?

Hello all. I am looking at trying to pass external HTML from a URL into the front end of my web app.

What I'd like to do is take the URL, e.g. https://www.example.com/example.html and render that code directly within a card on the front end of my app, utilising my own CSS. I don't want to use an iframe.

The links I have to these external HTML files are located in a database which I currently call from a variable.

Any help or direction is appreciated!

Just to clarify, I'd like to parse the HTML from an external source and display it in the front end of my web application.

0 likes
4 replies
sr57's avatar

Put your page in public and create a route to it.

super_simon123's avatar

Will that still allow me to render that within another page though, i.e. render the HTML and it's inherited attributes within a card?

Sorry, I should have been clearer in my question... I'd like to use that HTML to populate a section of a Blade template containing other "internal" items.

super_simon123's avatar

Yeah that's how to set a Blade file up, not how to take the raw HTML from an external source and render it as part of the page. Thanks anyway.

Please or to participate in this conversation.