Laravel 5.0 Blade Changes
Last updated on by Eric L. Barnes
The following is an excerpt from a previous issue of my weekly Laravel Newsletter. Signup and have useful tips like this delivered right to your inbox.
Laravel 5.0 is not scheduled to be released until November, as it’s on a 6 month release cycle. But one of the changes that I’ve seen mentioned a few times is the new blade echo tags.
In v4 it included the following two styles: “{{” and “{{{“. The double curly bracket was a raw echo and the triple curly bracket escaped.
Currently in 5.0 both the double and triple curly brackets escape the variable and a new “{!! $var !!}” is for raw.
A common use case for raw is with form helpers:
{!! Form::open() !!}
I always found the v4 way of doing it too subtle and easy to overlook. For me, this is a welcome change. Also be sure and checkout this post showing all the new Laravel 5 features.
Eric is the creator of Laravel News and has been covering Laravel since 2012.