I have a variable passed from my controller to my view. And I want to do a check in my view if the variable is empty I show a message if it's not empty I show a div.
This is what I've tried but it gives me a syntax error:
@if(!empty({!! $json !!}))
<div class=""></div>
@else
<p>Empty.</p>
@endif
I've also tried
@if(!empty($json))
Doesn't work either. I can't get to see the empty message
Anyone knows what I am doing wrong here?
Many thanks in advance!
dd($json)and see what the value actually is.