https://github.com/ctf0/laravel-goto-controller
https://github.com/ctf0/laravel-goto-controller
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ctf0/laravel-goto-controller
- Owner: ctf0
- License: gpl-3.0
- Created: 2020-01-31T03:32:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-23T13:40:47.000Z (almost 2 years ago)
- Last Synced: 2025-05-12T14:07:56.993Z (about 1 year ago)
- Language: TypeScript
- Size: 132 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Goto Controller
- project have to be handled by **Composer**
## Features
- Controller
>- add method/action to clipboard if not found in controller ex."used through a trait"
>- supports controller definitions like
> - Route::get('/', 'index'); // will have list of all controllers with the same action name
> - Route::get('/', [PhotoController::class, 'index']);
> - Route::get('/', 'PhotoController@index');
> - Route::get('/', 'Something\PhotoController@index');
> - Route::resource('/photo', 'PhotoController');
- Routes
>- to add project **APP_URL**, run `Laravel GoTo Controller` from the command palette.
>- popup will show both the route "uri & action"
> - uri: will open the link in browser "if route is a **GET** && **APP_URL** was added"
> - action: will open the controller file
### Notes
- the controller has to be following the [laravel convention](https://laravel.com/docs/master/controllers)
- `Closure` routes won't have a link
- for the controller link to redirect to the correct place
- make sure the `terminal.integrated.scrollback` is set to a big number ex.`100000` or even more if you have a very long list, otherwise, you might get redirected to the wrong controller.
- if the controllers still doesn't show up in the popup, try restarting the editor
> #### Laravel v9+
>
> with v9 the route listing cmnd has changed, so now u have a new config to get around this, u can set the config per project so u have the same experience regardless of the fw version.
>
>```json
>// v8-
>"laravelGotoController.routeListCommand": "artisan route:list --columns=uri,name,action,method --json",
>
>// v9+
>"laravelGotoController.routeListCommand": "artisan route:list --json",
>```