Ad

Is There Any Easy Way To Find Function From Laravel Controller?

- 1 answer

I am developing an Application in laravel for that I am using IDE (visual studio code). I am using the laravel controller. I wrote more than 50 function-related to that controller in one single controller. My problem is if I want to change something in one function, I want to find that function from a lot of codes. So that finding the function is very difficult for me. Please anyone says how can I easily find that function?

Currently, I am using ctrl+f and search that function name in visual studio code. But I think it is not the best way.

Ad

Answer

It's called Refactoring so you can search :

How refactor code in VSCode

Follow this link

When you are looking at your code and you want to find where a function or variable is defined, you can press F12 to navigate to the definition. This works in the same file or to another file when using TypeScript.

Ad
source: stackoverflow.com
Ad