driver to show contents of the database in symfony3? [closed]


Hello I have saved in the database, complete html codes, I need a controller to show the result of the code in a new page.

asked by Jra 11.12.2018 в 14:07

1 answer


You retrieve the content in the contractor in a variable as a text string:


Then you pass it as a parameter when you render the new page in the controller.

return $this->render('ruta a la pagina/nueva_pagina.html.twig',['html'=>$html]);

Then you render it on the page with twig.

<!DOCTYPE html>
        {{ html }}
answered by 11.12.2018 / 17:13