Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Checking greater than or equal

I need to check if the displayed number is greater than or equal to 1, or not equal to 0, then we display it

I am trying to do this but I get the error

<span class="comments">
@if({{ $allArticleCommentsCount }} >= 1) {{ $allArticleCommentsCount }} @endif Comments
</span>

syntax error, unexpected ‘<‘

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Remove the blade syntax in your if statement and you’re good to go.

@if($allArticleCommentsCount >= 1) {{ $allArticleCommentsCount }} @endif Comments
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading