Laravel Blade without extra whitespace?
You can add {{""}}
in between the code you want to close or connect without space.
<p>@if($foo)@if($bar)test@endif{{""}}@endif</p>
Try with a ternary operator, there is no whitespace control in Laravel
<p>{{ $foo ? ($bar ? 'test' : '') : ''}}</p>