Requirements
- PHP and artisan CLI available on your host machine
Usage
Open the Command Palette
Press Cmd+Shift+P (on Mac) or Ctrl+Shift+P (on Windows/Linux).
Search for "Laravel: Find Controller Method by URL"
Enter a URL from your project
Select a method from the dropdown (GET, POST, etc.)
If the URL is valid in your current project, VS Code will open an editor at the method of the controller
Optional Keybinding
VS Code UI
Open Keyboard Shortcuts
Press Cmd+K+Cmd+S (on Mac) or Ctrl+K+Ctrl+S (on Windows/Linux).
Search for "Laravel: Find Controller Method by URL"
Assign a keybinding
JSON
Open the Command Palette
Press Cmd+Shift+P (on Mac) or Ctrl+Shift+P (on Windows/Linux).
Search for "Preferences: Open Keyboard Shortcuts (JSON)"
In the keybindings.json file, you can add a shortcut to run this command:
[
{
"key": "alt+cmd+u",
"command": "laravelRouteFinder.find"
}
]
- Save the file.
| |