Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

milkncookiez's avatar

Form syntax in the views

I started with L4 and then noticed that there are lots of courses about L5, so I just switched to 5, but I noticed one thing, that I didn't quite understand... and didn't like also. Let's take these 2 snippets:

{!! Form::label('email', 'Email: ') !!}
{!! Form::email('email') !!}

and

{{ Form::label('email', 'Email:') }}
{{ Form::email('email') }}

So, in L4 we use the 2nd version and it does not escape the html code and it's fine, works like a charm. In L5, though, we have to use the {!! !!} version because otherwise just 2 curly braces will make escaping. Nevertheless, I prefer the 2nd version (the {{ }} ) because it provides auto-completion for the functions that I write inside and it also colours the code.

So, is it obligatory in L5 to use {!! !!} and if so - is there any other way so that I can get use of the functionality of autocompletion and colouring as of {{ }} ?

0 likes
7 replies
bestmomo's avatar

{!! !!} is the new raw version for L5 so you must use it to get no escaped stuff. For auto-completion just wait for your editor plugins update :)

milkncookiez's avatar

Well, that sucks big time... I am using PhpStorm, so I guess jetbrains are going to do their job quickly. :D What about the colouring? Do you think it is also going to be implemented along with the plugin update?

bashy's avatar

If you use forms a lot, you could make some live templates to make it easier :)

milkncookiez's avatar

Yep, I am using the live templates a lot. :) The thing is that I am not the only one working on the project and colouring the code is quite helpful and easier to read when going through someone-else's code.

Anyway, thanks for the answers! I will wait for some improvement on this matter in future. :)

bashy's avatar

Yeah nothing will be done while it's still being developed, they will surely update it since they keep an eye on Laravel stuff :)

Jeffberry's avatar
Level 4

Hey @milkncookiez, if you've updated to PHPStorm 8.0.2 then this new syntax is supported, you just have to configure it. Go to Preferences (or Settings on Windows I think) -> Languages & Frameworks -> PHP -> Blade and then all you need to do is switch the "raw tags" over to the new syntax ( {!! and !!} )

1 like

Please or to participate in this conversation.