Open view files and named routes quickly.
- Sublime Text 3
- Laravel or Lumen installation
- composer.json in the project's root directory
- Change to your Sublime Text
Packages
directory - Clone repository
git clone https://github.com/pszucs/LaravelOpener.git 'LaravelOpener'
- Download the latest stable release
- Unzip the archive to your Sublime Text
Packages
directory
- Add the project's root directory to the project's config file
Sublime -> Project -> Edit project
:"laravel_opener_project_root": "your_app_root"
this is to help determine which directory to work in if you have multiple directories added to the project
- Open
Packages / LaravelOpener / LaravelOpener.sublime-settings
and change these if necessary - Add / replace the key combination in
Sublime -> Preferences -> Key Bindings
to trigger the plugin:{"keys": ["ctrl+shift+o"], "command": "laravel_opener" }
- Place the cursor on the line in the source file where the link to the view file is.
return view('user.edit.permissions', compact('user', 'roles'));
Supported methods: view(), View::make(), @include()
- Press the key combination (default:
ctrl+shift+o
)if the view file doesn't exist and you save the file it will be saved in the appropriate directory
- Navigate to the controller method using the Command Palette - this will select/highlight the function name.
- Press the key combination (default:
ctrl+shift+o
)
- Place the cursor on the line in the routes file where the controller and method is defined:
Route::post('upload/store_image', ['as' => 'image', 'uses' => 'FileUploadController@storeImage']);
- Press the key combination (default:
ctrl+shift+o
) and the controller opens with the method name selected. Press the key combination again and the view file opens too.
- Place the cursor in the source file where the link to the route is.
{{ route("createUser") }}
- Press the key combination (default:
ctrl+shift+o
)
I'm not a Python programmer. ;)