in my view I have to output separately the one that is null
and the one that is empty string
so i have this:
@if( $str->a == null)
... // do somethin
@endif
@if( $str->a == '')
... // do somethin
@endif
the problem is they the same result.
Thanks
In the comments you've said you only want to check if it is null
. So, use is_null()
:
@if (is_null($str->a))
// do somethin
@endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With