Laravel Blade without extra whitespace?

前端 未结 5 1164
难免孤独
难免孤独 2021-01-04 03:23

If you do this you get an error:

@if($foo)@if($bar)test@endif@endif

And if you do this, you get

test

5条回答
  •  一生所求
    2021-01-04 04:23

    You can add {{""}} in between the code you want to close or connect without space.

    @if($foo)@if($bar)test@endif{{""}}@endif

提交回复
热议问题