T
T
terehinis2017-06-14 10:36:27
Laravel
terehinis, 2017-06-14 10:36:27

How to extend BladeCompiler in Laravel?

Need to add a function (reverse directive, DEregistration) to BladeCompiler. Can't figure out how to extend Blade.
An example of my problem: I
register, for example, the @newsFull directive, at the time of rendering the news module, after the rendering of the module has passed, remove this directive so that it cannot be called elsewhere where it is no longer needed.
Everything would be fine, but there are a dozen modules so far, and I already want to refuse the news prefixes in the directive, since most modules have such a directive as name, and in order not to write @newsName, @photoName, @photoGalleryName, @blaBlaBlaName, @photoGalleryName, @blaBlaBlaName, but just @name, you need to register this @name for each module (since the implementation of @name can spill).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timofey, 2017-06-14
@terehinis

And what does "reverse" mean?)
And what does "deregistration" mean?)
Just in case: in blade everything that you write with @ is called a directive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question