Given your URL:
http://locahost:8000/example?a=10
The best way that I have found to get the value for 'a' and display it on the page is to use the following:
{{ request()->get('a') }}
However, if you want to use it within an if statement, you could use:
@if( request()->get('a') )
<script>console.log('hello')</script>
@endif
Hope that helps someone! :)