I made a little progress with Blade::compileString() but it doesn't quite work.... anyone have any thoughts?
Example content
$content= '<h1>Contact Me</h1> @include('forms.contact')';
Display in blade
{{$content}}
The output is:
Contact Me
@include('forms.contact')
BUT If I do this in blade
{{Blade::compileString($content)}}
The output is:
Contact Me
make('forms.contact', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
I am getting closer.. Am I going about this the wrong way? Should I write my own parser? Am I missing something obvious?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community