CUSTOM Directive Does NOT Work WITH PHP
mahmoudmohamedramadan opened this issue · 3 comments
mahmoudmohamedramadan commented
When I run this code the custom directive does NOT rendered successfully
require_once dirname(__FILE__, 3) . '/vendor/autoload.php';
use Jenssegers\Blade\Blade;
$viewFolderPath = dirname(__FILE__, 3) . '/app/Blade/views';
$blade = new Blade($viewFolderPath, 'cache');
echo $blade->directive('php', function () {
return "<?php echo 'Welcome; ?>'";
});
and inside home.blade.php
@php
BUT the output be @php
NOT Welcome
as expected
QWp6t commented
mahmoudmohamedramadan commented
xy2z commented