How to check query string exists or not in laravel blade

Created at 30-Aug-2021 , By samar

How to check query string exists or not in laravel blade

Good day, guys. In this post, we’ll look at how to solve the "How to check query string exists or not in laravel blade" programming puzzle.

You can check query string exists or not in laravel blade with comparing the value with null. If query string is not exists in URL then it will return true while using comparision (=) operator.
  • Check query string exists or not in url in laravel blade

    @if(request()->get('page') == null)
        <p>Not Exists</p>
    @endif
    

    This code snippet will help you to find out the query with key (page) exists or not in URI. If the condition is true, it means there in no query key exists with name page in URI in laravel blade file.

Back to code snippet queries related laravel

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.