Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

skcin7's avatar

How to properly use Laravel API documentation??? Where can I read documentation for things like request()->getPathInfo() and request()->getQueryString()???

Hi. I'm using some functions in on my my Blade views such as: request()->getPathInfo() and request()->getQueryString(). This functionality is SUPER AWESOME and I want to learn more about it, and learn more about other functions which may be available as part of the Request object too. Maybe I'm just dumb but I can't seem to find documentation about these functions in the official Laravel API pages located here. Despite that is documentation for the Request object, no where on that page is there documentation for the getPathInfo and getQueryString functions. Am I doing something wrong??? Furthermore, when I search the API, and even when I search Google with laravel.com/api as part of the URL, I still can't find any documentation whatsoever about these 2 functions. I'm successfully calling these functions inside my Blade views, so they are definitely working.

Please let me know what I'm doing wrong and how to find where I can see more documentation about these 2 functions. Ideally, I'd like to see what other functions which may be available as part of the Request object too. Maybe I'm just unfamiliar with conventions on how to properly use documentation. There have been many times where I've attempted to search through the Laravel API documentation but couldn't find what I was looking for, so had to resort to what people told me on StackOverflow basically. It would be great if I could not resort to what people may say on StackOverflow and be able to know every function which may be available as part of some arbitrary Laravel object that I'm interested in.

Thank you for any help you may provide.

0 likes
2 replies
Nash's avatar

You are on the right track. As you can see from the API docs for Illuminate\Http\Request, it extends Symfony\Component\HttpFoundation\Request, which is where those particular two methods are located.

Tip: you can also open and study those files directly in your editor. Many editors and IDE's have some sort of "go to definition" functionality that will take you to the class. If you don't find what you are looking for on the first try, see what other classes or traits that particular class makes use of and continue going "up the ladder" until you find what you need.

Please or to participate in this conversation.