Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Livewire v4 MFC SwitcherNew to Visual Studio Code? Get it now.
Livewire v4 MFC Switcher

Livewire v4 MFC Switcher

gabrielvditzel

|
8 installs
| (0) | Free
Switch between component class and view files for Laravel Livewire
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Livewire Switcher

Switch between paired Laravel Livewire files with CMD + Alt + L on macOS or Ctrl + Alt + L on other platforms.

Credits

This extension is a fork of the original Livewire Switcher by bebo925. This fork adds support for Livewire 4 multi-file components while preserving the legacy switching workflow.

Supported layouts

  • Livewire 4 multi-file components in resources/views/components, resources/views/livewire, resources/views/pages, and resources/views/layouts
  • Custom Livewire 4 component roots declared in config/livewire.php through component_locations and component_namespaces
  • Legacy class-based components in app/Http/Livewire or app/Livewire paired with Blade views in resources/views/livewire
  • Custom legacy roots declared in config/livewire.php through class_path and view_path

Behavior

  • Inside a multi-file component, the shortcut cycles through <name>.php, <name>.blade.php, <name>.js, and <name>.test.php when those files exist
  • Inside a legacy Livewire component, the shortcut toggles between the class and Blade view
  • Multi-file cycle order is PHP -> Blade -> JS -> Test -> PHP, skipping missing files
  • Auxiliary multi-file files such as .css and .global.css do not switch anywhere
  • Single-file Livewire 4 Blade components do not switch anywhere because they do not have a paired PHP file

Settings

  • livewireSwitcher.multiFile.extraTargets: controls which extra multi-file targets participate in the cycle
  • Accepted values: js, test
  • Default: ["js", "test"]
  • Example: setting ["js"] changes the cycle to PHP -> Blade -> JS -> PHP
  • Example: setting [] limits the cycle to PHP -> Blade -> PHP

Notes

  • The extension keeps the existing command id livewire-switcher.switch
  • config/livewire.php is parsed statically; dynamic runtime registrations such as Livewire::addLocation() are not discovered
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft