I'm using the Wordpress framework Sage and it comes bundled with Blade templating. Sage has a custom directive called @asset which returns an asset URL. For example @assets('images/my-image.jpg').
I want to use that directive inside of an @include. Is it possible?
Example, I'd expect this to work but it returns an error saying that @asset is an undefined function, but it works fine outside of the @include:
@include('partials/components/hero', ['data' => [
'heading' => 'Hero heading example from pattern library',
'subtitle_1' => 'Hero subtitle example from pattern library',
'subtitle_2' => 'Hero subtitle example from pattern library',
'show_illustration' => true,
'illustration_src' => @asset('images/illustrations/1.
]])