Skip to content

CUSTOM Directive Does NOT Work WITH PHP #59

@mahmoudmohamedramadan

Description

@mahmoudmohamedramadan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions