Skip to content

How to extend blade syntax with your package #5

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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