Roots Discourse

Blade interpreter for sage 10


Seems that in sage 9 it was possible to use \App\template( $template_name [, $passing_variables] ) for rendering blade layouts anywhere needed. How can this be achieved in sage 10?

My ultimate goal is to use blade for rendering layout for a custom widget I am adding to sage 10 theme I am developing.



You can try the following:

Place use function Roots\view; at the top of your file.

Then use:

view( 'partials.partial', ['data' => $data] )->render();

where $data is an array of data that you are passing to the view.