I don't know if I choosed a good title for this question or not.
I want to implement a Template Engine to convert:
<ul>
[LOOP information]
<li>{{name}}</li>
[ENDLOOP]
</ul>
to:
<ul>
@foreach( $information as $element )
<li>{{$element->name}}</li>
@endforeach
</ul>
I've done converting. But I can't execute it runtime. eval("?>" . $html ) does not work.
Question is: How Laravel Blade compiles statements so I do the same ?
Also I tried to instantiate a new object from BladeCompiler in Illuminate\Filesystem\BladeCompiler but it's not working.
// Class 'BladeCompiler' not found
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community