V
V
Voll.2016-05-28 18:13:47
Laravel
Voll., 2016-05-28 18:13:47

Blade(Laravel) how to remove extra spaces?

I'm trying to write as simple a code as possible, but when using operators from Blade, a situation often arises that unexpected spaces appear:

<input name="trans[{{$lang}}][title]" title="name" value="@if(!empty($category->localizedTitle)){{$category->localizedTitle}}@else Category Name @endif"><br><br>

Spaces appear inside input when the else condition is triggered
Looks like this:
a2681b917d224ccf80dfe200a35f61dc.png
How to deal with them? Is there a comprehensive solution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-05-28
@vollthegreat

@else Category Name @Endiff 
     ^             ^

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question