Sometimes we need to check the current URL of requests in our application. Either we need to check the complete path or a specific string of current URL. It can be done easily using following methods provided with Laravel request object: Inspecting The Request Path / Route
The url method will return the URL without the query string, while the fullUrl method includes the query string: $url = $request->url(); $urlWithQueryString = $request->fullUrl(); If you would like to append query string data to the current URL, you may call the fullUrlWithQuery method. This method merges the given array of query string variables with the current query string: $request->fullUrlWithQuery(['type' => 'address']); so these are the ways to check and work on current URL in Laravel.