Pasting from the Sage book:
Rendering Blade templates from PHP (eg. hooks/actions and filters)
Find yourself needing to render a Blade template with PHP? Use the template
helper function available in the App
namespace.
Here’s an example of adding a [reviews]
shortcode that renders the partials/reviews.blade.php
file:
add_shortcode('reviews', function($atts) {
return \App\template('partials.reviews');
});