Skip to content

How to extend blade syntax with your package #5

@gecbla

Description

@gecbla

In Laravel someone can easily write

Blade::extend(function($value) {
    return preg_replace('/\@define(.+)/', '<?php ${1}; ?>', $value);
});

for custom syntax

@define $i = 1

Is this possible with your package and how? Method extend exists only in class Illuminate\View\Compilers\BladeCompiler.php

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