Framework: [5.4] Blade setContentTags removed

Created on 29 Jan 2017  路  4Comments  路  Source: laravel/framework

  • Laravel Version: 5.4.6
  • PHP Version: 5.6.29

Description:

In this commit all methods have been removed for customizing blade tags, and I can't find a reason why this has been done.

Steps To Reproduce:

Just put this line somewhere in your routes file for example:

Blade::setContentTags('[[', ']]');

Most helpful comment

screenshot_2017-03-03-07-13-51-485_com android chrome

All 4 comments

Yes, this feature has been removed.

I used this method to ensure compatibility with AngularJS. Is there another way to set the tags now? I don't understand why the method (along with setEscapedContentTags and setRawTags) was removed without deprecation notice or explanation

@GrahamCampbell @taylorotwell is there currently a way to ensure compatibility with AngularJS by changing the delimiters? We load the initial application using blade templates then the other 99.99% of the application is AngularJS so it is very useful to be able to change the blade delimiters so the most used technology isn't being altered for developers. Dropping in the snippet below into the AppServiceProvider was a really easy way to achieve this in our applications:

public function boot()
{
    // Change the default blade delimiters
    Blade::setRawTags('[!!', '!!]');
    Blade::setContentTags('[[', ']]');
    Blade::setEscapedContentTags('[[[', ']]]');
}

screenshot_2017-03-03-07-13-51-485_com android chrome

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SachinAgarwal1337 picture SachinAgarwal1337  路  3Comments

fideloper picture fideloper  路  3Comments

RomainSauvaire picture RomainSauvaire  路  3Comments

ghost picture ghost  路  3Comments

JamborJan picture JamborJan  路  3Comments