How to check query string exists or not in laravel blade

Updated 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