How to render a table builder in a public route, but append and prepend a bunch of other information
Created 3 years ago by edster

What is the best way to do this? Should I be using $table->render and configure a setting I am unaware of to customize the whole surrounding views?

Or should I create a view that would load up the table where I want it with twig like you can do with a form?

If that is the better way, how would I do that?


ryanthompson  —  3 years ago Best Answer

Simlar to the form builder - after the make stage you can get the content out of it. So if you have $table->make(); in your controller - just pass it along to the view and get the content out:

{{ table.table_content|raw }}

There is no table() function which wouldn't be a bad idea. Ima make an issue for it.

edster  —  3 years ago

So that didn't work

I had to use {{ table.getTableContent()|raw }}